You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

119 lines
3.4 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Util;
  3. using System.Data;
  4. using System.Web.Mvc;
  5. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  9. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2020-06-10 12:25
  12. /// 描 述:文化程度
  13. /// </summary>
  14. public class BCdCultureDegreeController : MvcControllerBase
  15. {
  16. private BCdCultureDegreeIBLL bCdCultureDegreeIBLL = new BCdCultureDegreeBLL();
  17. #region 视图功能
  18. /// <summary>
  19. /// 主页面
  20. /// <summary>
  21. /// <returns></returns>
  22. [HttpGet]
  23. public ActionResult Index()
  24. {
  25. return View();
  26. }
  27. /// <summary>
  28. /// 表单页
  29. /// <summary>
  30. /// <returns></returns>
  31. [HttpGet]
  32. public ActionResult Form()
  33. {
  34. return View();
  35. }
  36. #endregion
  37. #region 获取数据
  38. /// <summary>
  39. /// 获取列表数据
  40. /// <summary>
  41. /// <returns></returns>
  42. [HttpGet]
  43. [AjaxOnly]
  44. public ActionResult GetList( string queryJson )
  45. {
  46. var data = bCdCultureDegreeIBLL.GetList(queryJson);
  47. return Success(data);
  48. }
  49. /// <summary>
  50. /// 获取列表分页数据
  51. /// <param name="pagination">分页参数</param>
  52. /// <summary>
  53. /// <returns></returns>
  54. [HttpGet]
  55. [AjaxOnly]
  56. public ActionResult GetPageList(string pagination, string queryJson)
  57. {
  58. Pagination paginationobj = pagination.ToObject<Pagination>();
  59. var data = bCdCultureDegreeIBLL.GetPageList(paginationobj, queryJson);
  60. var jsonData = new
  61. {
  62. rows = data,
  63. total = paginationobj.total,
  64. page = paginationobj.page,
  65. records = paginationobj.records
  66. };
  67. return Success(jsonData);
  68. }
  69. /// <summary>
  70. /// 获取表单数据
  71. /// <param name="keyValue">主键</param>
  72. /// <summary>
  73. /// <returns></returns>
  74. [HttpGet]
  75. [AjaxOnly]
  76. public ActionResult GetFormData(string keyValue)
  77. {
  78. var data = bCdCultureDegreeIBLL.GetEntity(keyValue);
  79. return Success(data);
  80. }
  81. #endregion
  82. #region 提交数据
  83. /// <summary>
  84. /// 删除实体数据
  85. /// <param name="keyValue">主键</param>
  86. /// <summary>
  87. /// <returns></returns>
  88. [HttpPost]
  89. [AjaxOnly]
  90. public ActionResult DeleteForm(string keyValue)
  91. {
  92. bCdCultureDegreeIBLL.DeleteEntity(keyValue);
  93. return Success("删除成功!");
  94. }
  95. /// <summary>
  96. /// 保存实体数据(新增、修改)
  97. /// <param name="keyValue">主键</param>
  98. /// <summary>
  99. /// <returns></returns>
  100. [HttpPost]
  101. [ValidateAntiForgeryToken]
  102. [AjaxOnly]
  103. public ActionResult SaveForm(string keyValue,BCdCultureDegreeEntity entity)
  104. {
  105. bCdCultureDegreeIBLL.SaveEntity(keyValue, entity);
  106. return Success("保存成功!");
  107. }
  108. #endregion
  109. }
  110. }