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.
 
 
 
 
 
 

136 lines
3.9 KiB

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