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.
 
 
 
 
 
 

155 lines
4.4 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. using System;
  7. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2019-10-28 11:48
  14. /// 描 述:学籍异动
  15. /// </summary>
  16. public class StuInfoBasicChangeController : MvcControllerBase
  17. {
  18. private StuInfoBasicChangeIBLL stuInfoBasicChangeIBLL = new StuInfoBasicChangeBLL();
  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="queryJson">查询参数</param>
  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 = stuInfoBasicChangeIBLL.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. /// <summary>
  72. /// <returns></returns>
  73. [HttpGet]
  74. [AjaxOnly]
  75. public ActionResult GetFormData(string keyValue)
  76. {
  77. var StuInfoBasicChangeData = stuInfoBasicChangeIBLL.GetStuInfoBasicChangeEntity(keyValue);
  78. var jsonData = new
  79. {
  80. StuInfoBasicChange = StuInfoBasicChangeData,
  81. };
  82. return Success(jsonData);
  83. }
  84. #endregion
  85. #region 提交数据
  86. /// <summary>
  87. /// 删除实体数据
  88. /// <param name="keyValue">主键</param>
  89. /// <summary>
  90. /// <returns></returns>
  91. [HttpPost]
  92. [AjaxOnly]
  93. public ActionResult DeleteForm(string keyValue)
  94. {
  95. stuInfoBasicChangeIBLL.DeleteEntity(keyValue);
  96. return Success("删除成功!");
  97. }
  98. /// <summary>
  99. /// 保存实体数据(新增、修改)
  100. /// <param name="keyValue">主键</param>
  101. /// <summary>
  102. /// <returns></returns>
  103. [HttpPost]
  104. [ValidateAntiForgeryToken]
  105. [AjaxOnly]
  106. public ActionResult SaveForm(string keyValue, string strEntity)
  107. {
  108. StuInfoBasicChangeEntity entity = strEntity.ToObject<StuInfoBasicChangeEntity>();
  109. var loginUserInfo = LoginUserInfo.Get();
  110. entity.CreateTime = DateTime.Now;
  111. entity.CreateUserId = loginUserInfo.account;
  112. entity.CheckStatus = 0;
  113. stuInfoBasicChangeIBLL.SaveEntity(keyValue, entity);
  114. return Success("保存成功!");
  115. }
  116. /// <summary>
  117. /// 审核实体数据
  118. /// <param name="keyValue">主键</param>
  119. /// <summary>
  120. /// <returns></returns>
  121. [HttpPost]
  122. [AjaxOnly]
  123. public ActionResult CheckForm(string keyValue)
  124. {
  125. stuInfoBasicChangeIBLL.DoCheck(keyValue);
  126. return Success("操作成功!");
  127. }
  128. /// <summary>
  129. /// 去审核实体数据
  130. /// <param name="keyValue">主键</param>
  131. /// <summary>
  132. /// <returns></returns>
  133. [HttpPost]
  134. [AjaxOnly]
  135. public ActionResult UnCheckForm(string keyValue)
  136. {
  137. stuInfoBasicChangeIBLL.DoUnCheck(keyValue);
  138. return Success("操作成功!");
  139. }
  140. #endregion
  141. }
  142. }