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.
 
 
 
 
 
 

127 lines
3.7 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 V7.0.6 力软敏捷开发框架
  10. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2022-11-21 11:32
  13. /// 描 述:学生资助管理
  14. /// </summary>
  15. public class StuSubsidizeController : MvcControllerBase
  16. {
  17. private StuSubsidizeIBLL stuSubsidizeIBLL = new StuSubsidizeBLL();
  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 FormView()
  43. {
  44. return View();
  45. }
  46. #endregion
  47. #region 获取数据
  48. /// <summary>
  49. /// 获取页面显示列表数据
  50. /// </summary>
  51. /// <param name="pagination">分页参数</param>
  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 = stuSubsidizeIBLL.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. /// <param name="keyValue">主键</param>
  73. /// <returns></returns>
  74. [HttpGet]
  75. [AjaxOnly]
  76. public ActionResult GetFormData(string keyValue)
  77. {
  78. var StuSubsidizeData = stuSubsidizeIBLL.GetStuSubsidizeEntity( keyValue );
  79. var jsonData = new {
  80. StuSubsidize = StuSubsidizeData,
  81. };
  82. return Success(jsonData);
  83. }
  84. #endregion
  85. #region 提交数据
  86. /// <summary>
  87. /// 删除实体数据
  88. /// </summary>
  89. /// <param name="keyValue">主键</param>
  90. /// <returns></returns>
  91. [HttpPost]
  92. [AjaxOnly]
  93. public ActionResult DeleteForm(string keyValue)
  94. {
  95. stuSubsidizeIBLL.DeleteEntity(keyValue);
  96. return Success("删除成功!");
  97. }
  98. /// <summary>
  99. /// 保存实体数据(新增、修改)
  100. /// </summary>
  101. /// <param name="keyValue">主键</param>
  102. /// <param name="strEntity">实体</param>
  103. /// <returns></returns>
  104. [HttpPost]
  105. [ValidateAntiForgeryToken]
  106. [AjaxOnly]
  107. public ActionResult SaveForm(string keyValue, string strEntity)
  108. {
  109. StuSubsidizeEntity entity = strEntity.ToObject<StuSubsidizeEntity>();
  110. stuSubsidizeIBLL.SaveEntity(keyValue,entity);
  111. if (string.IsNullOrEmpty(keyValue))
  112. {
  113. }
  114. return Success("保存成功!");
  115. }
  116. #endregion
  117. }
  118. }