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.
 
 
 
 
 
 

169 lines
4.6 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.CustomFunction;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. namespace Learun.Application.Web.Areas.CustomFunction.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  10. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2021-08-11 18:00
  13. /// 描 述:竞赛辅导小组
  14. /// </summary>
  15. public class ContestCoachGroupController : MvcControllerBase
  16. {
  17. private ContestCoachGroupIBLL contestCoachGroupIBLL = new ContestCoachGroupBLL();
  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 IndexArrange()
  34. {
  35. return View();
  36. }
  37. /// <summary>
  38. /// 辅导安排
  39. /// <summary>
  40. /// <returns></returns>
  41. [HttpGet]
  42. public ActionResult FormArrange()
  43. {
  44. return View();
  45. }
  46. /// <summary>
  47. /// 表单页
  48. /// <summary>
  49. /// <returns></returns>
  50. [HttpGet]
  51. public ActionResult Form()
  52. {
  53. return View();
  54. }
  55. /// <summary>
  56. /// 表单页
  57. /// <summary>
  58. /// <returns></returns>
  59. [HttpGet]
  60. public ActionResult FormStu()
  61. {
  62. return View();
  63. }
  64. /// <summary>
  65. /// 表单页
  66. /// <summary>
  67. /// <returns></returns>
  68. [HttpGet]
  69. public ActionResult FormPlan()
  70. {
  71. return View();
  72. }
  73. #endregion
  74. #region 获取数据
  75. /// <summary>
  76. /// 获取页面显示列表数据
  77. /// </summary>
  78. /// <param name="pagination">分页参数</param>
  79. /// <param name="queryJson">查询参数</param>
  80. /// <returns></returns>
  81. [HttpGet]
  82. [AjaxOnly]
  83. public ActionResult GetPageList(string pagination, string queryJson)
  84. {
  85. Pagination paginationobj = pagination.ToObject<Pagination>();
  86. var data = contestCoachGroupIBLL.GetPageList(paginationobj, queryJson);
  87. var jsonData = new
  88. {
  89. rows = data,
  90. total = paginationobj.total,
  91. page = paginationobj.page,
  92. records = paginationobj.records
  93. };
  94. return Success(jsonData);
  95. }
  96. /// <summary>
  97. /// 获取列表数据
  98. /// </summary>
  99. /// <param name="keyValue">主键</param>
  100. /// <returns></returns>
  101. [HttpGet]
  102. [AjaxOnly]
  103. public ActionResult GetList()
  104. {
  105. var data = contestCoachGroupIBLL.GetList();
  106. return Success(data);
  107. }
  108. /// <summary>
  109. /// 获取表单数据
  110. /// </summary>
  111. /// <param name="keyValue">主键</param>
  112. /// <returns></returns>
  113. [HttpGet]
  114. [AjaxOnly]
  115. public ActionResult GetFormData(string keyValue)
  116. {
  117. var ContestCoachGroupData = contestCoachGroupIBLL.GetContestCoachGroupEntity(keyValue);
  118. var jsonData = new
  119. {
  120. ContestCoachGroup = ContestCoachGroupData,
  121. };
  122. return Success(jsonData);
  123. }
  124. #endregion
  125. #region 提交数据
  126. /// <summary>
  127. /// 删除实体数据
  128. /// </summary>
  129. /// <param name="keyValue">主键</param>
  130. /// <returns></returns>
  131. [HttpPost]
  132. [AjaxOnly]
  133. public ActionResult DeleteForm(string keyValue)
  134. {
  135. contestCoachGroupIBLL.DeleteEntity(keyValue);
  136. return Success("删除成功!");
  137. }
  138. /// <summary>
  139. /// 保存实体数据(新增、修改)
  140. /// </summary>
  141. /// <param name="keyValue">主键</param>
  142. /// <param name="strEntity">实体</param>
  143. /// <returns></returns>
  144. [HttpPost]
  145. [ValidateAntiForgeryToken]
  146. [AjaxOnly]
  147. public ActionResult SaveForm(string keyValue, string strEntity)
  148. {
  149. ContestCoachGroupEntity entity = strEntity.ToObject<ContestCoachGroupEntity>();
  150. contestCoachGroupIBLL.SaveEntity(keyValue, entity);
  151. if (string.IsNullOrEmpty(keyValue))
  152. {
  153. }
  154. return Success("保存成功!");
  155. }
  156. #endregion
  157. }
  158. }