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.
 
 
 
 
 
 

178 lines
5.0 KiB

  1. using System;
  2. using Learun.Util;
  3. using System.Data;
  4. using Learun.Application.TwoDevelopment.EducationalAdministration;
  5. using System.Web.Mvc;
  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-10-11 16:46
  14. /// 描 述:助学金及审核
  15. /// </summary>
  16. public class ScholarshipxjController : MvcControllerBase
  17. {
  18. private ScholarshipxjIBLL scholarshipxjIBLL = new ScholarshipxjBLL();
  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 Indexzxj()
  44. {
  45. return View();
  46. }
  47. /// <summary>
  48. /// 助学金
  49. /// </summary>
  50. /// <returns></returns>
  51. [HttpGet]
  52. public ActionResult Formzxj()
  53. {
  54. return View();
  55. }
  56. /// <summary>
  57. /// 审核
  58. /// </summary>
  59. /// <returns></returns>
  60. [HttpGet]
  61. public ActionResult IndexAudit()
  62. {
  63. return View();
  64. }
  65. /// <summary>
  66. /// 审核
  67. /// </summary>
  68. /// <returns></returns>
  69. [HttpGet]
  70. public ActionResult FormAudit()
  71. {
  72. return View();
  73. }
  74. #endregion
  75. #region 获取数据
  76. /// <summary>
  77. /// 获取页面显示列表数据
  78. /// </summary>
  79. /// <param name="pagination">分页参数</param>
  80. /// <param name="queryJson">查询参数</param>
  81. /// <returns></returns>
  82. [HttpGet]
  83. [AjaxOnly]
  84. public ActionResult GetPageList(string pagination, string queryJson)
  85. {
  86. Pagination paginationobj = pagination.ToObject<Pagination>();
  87. var data = scholarshipxjIBLL.GetPageList(paginationobj, queryJson);
  88. var jsonData = new
  89. {
  90. rows = data,
  91. total = paginationobj.total,
  92. page = paginationobj.page,
  93. records = paginationobj.records
  94. };
  95. return Success(jsonData);
  96. }
  97. /// <summary>
  98. /// 获取表单数据
  99. /// </summary>
  100. /// <param name="keyValue">主键</param>
  101. /// <returns></returns>
  102. [HttpGet]
  103. [AjaxOnly]
  104. public ActionResult GetFormData(string keyValue)
  105. {
  106. var ScholarshipxjData = scholarshipxjIBLL.GetScholarshipxjEntity(keyValue);
  107. var jsonData = new
  108. {
  109. Scholarshipxj = ScholarshipxjData,
  110. };
  111. return Success(jsonData);
  112. }
  113. #endregion
  114. #region 提交数据
  115. /// <summary>
  116. /// 删除实体数据
  117. /// </summary>
  118. /// <param name="keyValue">主键</param>
  119. /// <returns></returns>
  120. [HttpPost]
  121. [AjaxOnly]
  122. public ActionResult DeleteForm(string keyValue)
  123. {
  124. scholarshipxjIBLL.DeleteEntity(keyValue);
  125. return Success("删除成功!");
  126. }
  127. /// <summary>
  128. /// 保存实体数据(新增、修改)
  129. /// </summary>
  130. /// <param name="keyValue">主键</param>
  131. /// <param name="strEntity">实体</param>
  132. /// <returns></returns>
  133. [HttpPost]
  134. [ValidateAntiForgeryToken]
  135. [AjaxOnly]
  136. public ActionResult SaveForm(string keyValue, string strEntity)
  137. {
  138. var LogUserinfo = LoginUserInfo.Get();
  139. ScholarshipxjEntity entity = strEntity.ToObject<ScholarshipxjEntity>();
  140. if (entity.State != "0")
  141. {
  142. entity.AuditPeople = LogUserinfo.userId;
  143. entity.AuditTime = DateTime.Today;
  144. }
  145. scholarshipxjIBLL.SaveEntity(keyValue, entity);
  146. if (string.IsNullOrEmpty(keyValue))
  147. {
  148. }
  149. return Success("保存成功!");
  150. }
  151. #endregion
  152. #region 扩展数据
  153. /// <summary>
  154. /// 删除实体数据
  155. /// </summary>
  156. /// <param name="keyValue">主键</param>
  157. /// <returns></returns>
  158. [HttpPost]
  159. [AjaxOnly]
  160. public ActionResult AduitForm(string keyValue)
  161. {
  162. var logUser = LoginUserInfo.Get();
  163. scholarshipxjIBLL.AuditEntity(keyValue, logUser.userId);
  164. return Success("审核成功!");
  165. }
  166. #endregion
  167. }
  168. }