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.

TextBookIndentDetailController.cs 3.6 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  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. /// 日 期:2022-02-27 09:35
  12. /// 描 述:TextBookIndentDetail
  13. /// </summary>
  14. public class TextBookIndentDetailController : MvcControllerBase
  15. {
  16. private TextBookIndentDetailIBLL textBookIndentDetailIBLL = new TextBookIndentDetailBLL();
  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 FormDetail()
  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 = textBookIndentDetailIBLL.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 = textBookIndentDetailIBLL.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 data = textBookIndentDetailIBLL.GetEntity(keyValue);
  81. return Success(data);
  82. }
  83. #endregion
  84. #region 提交数据
  85. /// <summary>
  86. /// 删除实体数据
  87. /// </summary>
  88. /// <param name="keyValue">主键</param>
  89. /// <returns></returns>
  90. [HttpPost]
  91. [AjaxOnly]
  92. public ActionResult DeleteForm(string keyValue)
  93. {
  94. textBookIndentDetailIBLL.DeleteEntity(keyValue);
  95. return Success("删除成功!");
  96. }
  97. /// <summary>
  98. /// 保存实体数据(新增、修改)
  99. /// </summary>
  100. /// <param name="keyValue">主键</param>
  101. /// <param name="entity">实体</param>
  102. /// <returns></returns>
  103. [HttpPost]
  104. [ValidateAntiForgeryToken]
  105. [AjaxOnly]
  106. public ActionResult SaveForm(string keyValue,TextBookIndentDetailEntity entity)
  107. {
  108. textBookIndentDetailIBLL.SaveEntity(keyValue, entity);
  109. return Success("保存成功!");
  110. }
  111. #endregion
  112. }
  113. }