Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

195 lignes
5.7 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Util;
  3. using System.Data;
  4. using System.Linq;
  5. using System.Web.Mvc;
  6. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  10. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2023-03-13 10:37
  13. /// 描 述:定制功能助学金
  14. /// </summary>
  15. public class StuFellowshipController : MvcControllerBase
  16. {
  17. private StuFellowshipIBLL stuFellowshipIBLL = new StuFellowshipBLL();
  18. private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
  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. var logUser = LoginUserInfo.Get();
  37. var ClassNos = "";
  38. var Classinfo = classInfoIBLL.GetAllClass().Where(x => x.ClassTutorNo == logUser.account).ToList();
  39. if (Classinfo.Any())
  40. {
  41. foreach (var item in Classinfo)
  42. {
  43. ClassNos += item.ClassNo + ",";
  44. }
  45. }
  46. ViewBag.ClassNo = ClassNos.TrimEnd(',');
  47. return View();
  48. }
  49. /// <summary>
  50. /// 主页面【二级学院】
  51. /// </summary>
  52. /// <returns></returns>
  53. [HttpGet]
  54. public ActionResult IndexOfTwo()
  55. {
  56. return View();
  57. }
  58. /// <summary>
  59. /// 主页面【学工部】
  60. /// </summary>
  61. /// <returns></returns>
  62. [HttpGet]
  63. public ActionResult IndexOfThree()
  64. {
  65. return View();
  66. }
  67. /// <summary>
  68. /// 主页面【学生】
  69. /// </summary>
  70. /// <returns></returns>
  71. [HttpGet]
  72. public ActionResult IndexOfStudent()
  73. {
  74. return View();
  75. }
  76. #endregion
  77. #region 获取数据
  78. /// <summary>
  79. /// 获取列表数据
  80. /// </summary>
  81. /// <param name="queryJson">查询参数</param>
  82. /// <returns></returns>
  83. [HttpGet]
  84. [AjaxOnly]
  85. public ActionResult GetList(string queryJson)
  86. {
  87. var data = stuFellowshipIBLL.GetList(queryJson);
  88. return Success(data);
  89. }
  90. /// <summary>
  91. /// 获取列表分页数据
  92. /// </summary>
  93. /// <param name="pagination">分页参数</param>
  94. /// <param name="queryJson">查询参数</param>
  95. /// <returns></returns>
  96. [HttpGet]
  97. [AjaxOnly]
  98. public ActionResult GetPageList(string pagination, string queryJson)
  99. {
  100. Pagination paginationobj = pagination.ToObject<Pagination>();
  101. var data = stuFellowshipIBLL.GetPageList(paginationobj, queryJson);
  102. var jsonData = new
  103. {
  104. rows = data,
  105. total = paginationobj.total,
  106. page = paginationobj.page,
  107. records = paginationobj.records
  108. };
  109. return Success(jsonData);
  110. }
  111. /// <summary>
  112. /// 获取表单数据
  113. /// </summary>
  114. /// <param name="keyValue">主键</param>
  115. /// <returns></returns>
  116. [HttpGet]
  117. [AjaxOnly]
  118. public ActionResult GetFormData(string keyValue)
  119. {
  120. //var data = stuFellowshipIBLL.GetEntity(keyValue);
  121. //return Success(data);
  122. var stuFellowshipData = stuFellowshipIBLL.GetEntity(keyValue);
  123. var jsonData = new
  124. {
  125. StuFellowship = stuFellowshipData,
  126. };
  127. return Success(jsonData);
  128. }
  129. #endregion
  130. #region 提交数据
  131. /// <summary>
  132. /// 删除实体数据
  133. /// </summary>
  134. /// <param name="keyValue">主键</param>
  135. /// <returns></returns>
  136. [HttpPost]
  137. [AjaxOnly]
  138. public ActionResult DeleteForm(string keyValue)
  139. {
  140. stuFellowshipIBLL.DeleteEntity(keyValue);
  141. return Success("删除成功!");
  142. }
  143. /// <summary>
  144. /// 保存实体数据(新增、修改)
  145. /// </summary>
  146. /// <param name="keyValue">主键</param>
  147. /// <param name="entity">实体</param>
  148. /// <returns></returns>
  149. [HttpPost]
  150. [ValidateAntiForgeryToken]
  151. [AjaxOnly]
  152. public ActionResult SaveForm(string keyValue, string strEntity)
  153. {
  154. StuFellowshipEntity entity = strEntity.ToObject<StuFellowshipEntity>();
  155. stuFellowshipIBLL.SaveEntity(keyValue, entity);
  156. return Success("保存成功!");
  157. }
  158. /// <summary>
  159. /// 提交
  160. /// </summary>
  161. /// <param name="keyValue">主键</param>
  162. /// <returns></returns>
  163. [HttpPost]
  164. [AjaxOnly]
  165. public ActionResult DoSubmit(string keyValue, string status, string step)
  166. {
  167. stuFellowshipIBLL.DoSubmit(keyValue, status, step);
  168. return Success("操作成功!");
  169. }
  170. /// <summary>
  171. /// 退回
  172. /// </summary>
  173. /// <param name="keyValue">主键</param>
  174. /// <returns></returns>
  175. [HttpPost]
  176. [AjaxOnly]
  177. public ActionResult DoBack(string keyValue, string status, string step)
  178. {
  179. stuFellowshipIBLL.DoBack(keyValue, status, step);
  180. return Success("操作成功!");
  181. }
  182. #endregion
  183. }
  184. }