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.
 
 
 
 
 
 

154 lines
4.8 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.EducationalAdministration;
  4. using System.Web.Mvc;
  5. using Learun.Application.TwoDevelopment.LR_CodeDemo;
  6. using System.Collections.Generic;
  7. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  11. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2021-04-14 11:52
  14. /// 描 述:学生撤销违纪管理
  15. /// </summary>
  16. public class StuDisciplineManagementController : MvcControllerBase
  17. {
  18. private StuDisciplineManagementIBLL stuDisciplineManagementIBLL = new StuDisciplineManagementBLL();
  19. #region 视图功能
  20. /// <summary>
  21. /// 主页面
  22. /// <summary>
  23. /// <returns></returns>
  24. [HttpGet]
  25. public ActionResult Index()
  26. {
  27. return View();
  28. }
  29. /// <summary>
  30. /// 表单页
  31. /// <summary>
  32. /// <returns></returns>
  33. [HttpGet]
  34. public ActionResult Form()
  35. {
  36. return View();
  37. }
  38. /// <summary>
  39. /// 表单页-查看
  40. /// <summary>
  41. /// <returns></returns>
  42. [HttpGet]
  43. public ActionResult FormView()
  44. {
  45. return View();
  46. }
  47. #endregion
  48. #region 获取数据
  49. /// <summary>
  50. /// 获取页面显示列表数据
  51. /// </summary>
  52. /// <param name="pagination">分页参数</param>
  53. /// <param name="queryJson">查询参数</param>
  54. /// <returns></returns>
  55. [HttpGet]
  56. [AjaxOnly]
  57. public ActionResult GetPageList(string pagination, string queryJson)
  58. {
  59. Pagination paginationobj = pagination.ToObject<Pagination>();
  60. var data = stuDisciplineManagementIBLL.GetPageList(paginationobj, queryJson);
  61. var jsonData = new
  62. {
  63. rows = data,
  64. total = paginationobj.total,
  65. page = paginationobj.page,
  66. records = paginationobj.records
  67. };
  68. return Success(jsonData);
  69. }
  70. /// <summary>
  71. /// 获取表单数据
  72. /// </summary>
  73. /// <param name="keyValue">主键</param>
  74. /// <returns></returns>
  75. [HttpGet]
  76. [AjaxOnly]
  77. public ActionResult GetFormData(string keyValue)
  78. {
  79. var StuDisciplineManagementData = stuDisciplineManagementIBLL.GetStuDisciplineManagementEntity( keyValue );
  80. var jsonData = new {
  81. StuDisciplineManagement = StuDisciplineManagementData,
  82. };
  83. return Success(jsonData);
  84. }
  85. /// <summary>
  86. /// 获取表单数据
  87. /// </summary>
  88. /// <param name="processId">流程实例主键</param>
  89. /// <returns></returns>
  90. [HttpGet]
  91. [AjaxOnly]
  92. public ActionResult GetFormDataByProcessId(string processId)
  93. {
  94. var StuDisciplineManagementData = stuDisciplineManagementIBLL.GetEntityByProcessId( processId );
  95. var jsonData = new {
  96. StuDisciplineManagement = StuDisciplineManagementData,
  97. };
  98. return Success(jsonData);
  99. }
  100. #endregion
  101. #region 提交数据
  102. /// <summary>
  103. /// 删除实体数据
  104. /// </summary>
  105. /// <param name="keyValue">主键</param>
  106. /// <returns></returns>
  107. [HttpPost]
  108. [AjaxOnly]
  109. public ActionResult DeleteForm(string keyValue)
  110. {
  111. stuDisciplineManagementIBLL.DeleteEntity(keyValue);
  112. return Success("删除成功!");
  113. }
  114. /// <summary>
  115. /// 保存实体数据(新增、修改)
  116. /// </summary>
  117. /// <param name="keyValue">主键</param>
  118. /// <param name="strEntity">实体</param>
  119. /// <returns></returns>
  120. [HttpPost]
  121. [ValidateAntiForgeryToken]
  122. [AjaxOnly]
  123. public ActionResult SaveForm(string keyValue, string strEntity)
  124. {
  125. StuDisciplineManagementEntity entity = strEntity.ToObject<StuDisciplineManagementEntity>();
  126. entity.CheckStatus = "0";
  127. stuDisciplineManagementIBLL.SaveEntity(keyValue,entity);
  128. return Success("保存成功!");
  129. }
  130. /// <summary>
  131. /// 提交实体数据
  132. /// </summary>
  133. /// <param name="keyValue">主键</param>
  134. /// <returns></returns>
  135. [HttpPost]
  136. [AjaxOnly]
  137. public ActionResult DoSubmit(string keyValue, string status, string processId)
  138. {
  139. stuDisciplineManagementIBLL.DoSubmit(keyValue, status, processId);
  140. return Success("提交成功!");
  141. }
  142. #endregion
  143. }
  144. }