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.
 
 
 
 
 
 

126 lines
3.6 KiB

  1. using Learun.Application.TwoDevelopment.EducationalAdministration;
  2. using Learun.Util;
  3. using System.Data;
  4. using System.Web.Mvc;
  5. namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
  6. {
  7. /// <summary>
  8. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  9. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  10. /// 创 建:超级管理员
  11. /// 日 期:2023-10-13 10:31
  12. /// 描 述:教材管理学生收费
  13. /// </summary>
  14. public class BookPayDetailController : MvcControllerBase
  15. {
  16. private BookPayDetailIBLL bookPayDetailIBLL = new BookPayDetailBLL();
  17. #region 视图功能
  18. /// <summary>
  19. /// 主页面
  20. /// </summary>
  21. /// <returns></returns>
  22. [HttpGet]
  23. public ActionResult Index()
  24. {
  25. return View();
  26. }
  27. /// <summary>
  28. /// 表单页
  29. /// </summary>
  30. /// <returns></returns>
  31. [HttpGet]
  32. public ActionResult Form()
  33. {
  34. return View();
  35. }
  36. #endregion
  37. #region 获取数据
  38. /// <summary>
  39. /// 获取列表数据
  40. /// </summary>
  41. /// <param name="queryJson">查询参数</param>
  42. /// <returns></returns>
  43. [HttpGet]
  44. [AjaxOnly]
  45. public ActionResult GetList( string queryJson )
  46. {
  47. var data = bookPayDetailIBLL.GetList(queryJson);
  48. return Success(data);
  49. }
  50. /// <summary>
  51. /// 获取列表分页数据
  52. /// </summary>
  53. /// <param name="pagination">分页参数</param>
  54. /// <param name="queryJson">查询参数</param>
  55. /// <returns></returns>
  56. [HttpGet]
  57. [AjaxOnly]
  58. public ActionResult GetPageList(string pagination, string queryJson)
  59. {
  60. Pagination paginationobj = pagination.ToObject<Pagination>();
  61. var data = bookPayDetailIBLL.GetPageList(paginationobj, queryJson);
  62. var jsonData = new
  63. {
  64. rows = data,
  65. total = paginationobj.total,
  66. page = paginationobj.page,
  67. records = paginationobj.records
  68. };
  69. return Success(jsonData);
  70. }
  71. /// <summary>
  72. /// 获取表单数据
  73. /// </summary>
  74. /// <param name="keyValue">主键</param>
  75. /// <returns></returns>
  76. [HttpGet]
  77. [AjaxOnly]
  78. public ActionResult GetFormData(string keyValue)
  79. {
  80. var BookPayDetailData = bookPayDetailIBLL.GetEntity(keyValue);
  81. var jsonData = new
  82. {
  83. BookPayDetail = BookPayDetailData,
  84. };
  85. return Success(jsonData);
  86. }
  87. #endregion
  88. #region 提交数据
  89. /// <summary>
  90. /// 删除实体数据
  91. /// </summary>
  92. /// <param name="keyValue">主键</param>
  93. /// <returns></returns>
  94. [HttpPost]
  95. [AjaxOnly]
  96. public ActionResult DeleteForm(string keyValue)
  97. {
  98. bookPayDetailIBLL.DeleteEntity(keyValue);
  99. return Success("删除成功!");
  100. }
  101. /// <summary>
  102. /// 保存实体数据(新增、修改)
  103. /// </summary>
  104. /// <param name="keyValue">主键</param>
  105. /// <param name="entity">实体</param>
  106. /// <returns></returns>
  107. [HttpPost]
  108. [ValidateAntiForgeryToken]
  109. [AjaxOnly]
  110. public ActionResult SaveForm(string keyValue,BookPayDetailEntity entity)
  111. {
  112. bookPayDetailIBLL.SaveEntity(keyValue, entity);
  113. return Success("保存成功!");
  114. }
  115. #endregion
  116. }
  117. }