Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 
 
 

166 строки
5.0 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-Ultimate V7.0.0 数字化智慧校园
  10. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2019-08-21 17:28
  13. /// 描 述:成绩比例设置
  14. /// </summary>
  15. public class OpenLessonPlanController : MvcControllerBase
  16. {
  17. private OpenLessonPlanIBLL openLessonPlanIBLL = new OpenLessonPlanBLL();
  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 FormOfClass()
  43. {
  44. return View();
  45. }
  46. #endregion
  47. #region 获取数据
  48. /// <summary>
  49. /// 获取页面显示列表数据
  50. /// <summary>
  51. /// <param name="queryJson">查询参数</param>
  52. /// <returns></returns>
  53. [HttpGet]
  54. [AjaxOnly]
  55. public ActionResult GetPageList(string pagination, string queryJson)
  56. {
  57. Pagination paginationobj = pagination.ToObject<Pagination>();
  58. var data = openLessonPlanIBLL.GetPageList(paginationobj, queryJson);
  59. var jsonData = new
  60. {
  61. rows = data,
  62. total = paginationobj.total,
  63. page = paginationobj.page,
  64. records = paginationobj.records
  65. };
  66. return Success(jsonData);
  67. }
  68. /// <summary>
  69. /// 获取表单数据
  70. /// <summary>
  71. /// <returns></returns>
  72. [HttpGet]
  73. [AjaxOnly]
  74. public ActionResult GetFormData(string keyValue)
  75. {
  76. var OpenLessonPlanData = openLessonPlanIBLL.GetOpenLessonPlanEntity( keyValue );
  77. var jsonData = new {
  78. OpenLessonPlan = OpenLessonPlanData,
  79. };
  80. return Success(jsonData);
  81. }
  82. /// <summary>
  83. /// 获取表单数据
  84. /// <summary>
  85. /// <returns></returns>
  86. [HttpGet]
  87. [AjaxOnly]
  88. public ActionResult GetOpenLessonPlanEntityByJson(string queryJson)
  89. {
  90. var OpenLessonPlanData = openLessonPlanIBLL.GetOpenLessonPlanEntityByJson(queryJson);
  91. var jsonData = new
  92. {
  93. OpenLessonPlan = OpenLessonPlanData,
  94. };
  95. return Success(jsonData);
  96. }
  97. /// <summary>
  98. /// 获取表单数据
  99. /// <summary>
  100. /// <returns></returns>
  101. [HttpGet]
  102. [AjaxOnly]
  103. public ActionResult GetStuSelectLessonListEntityByJson(string queryJson)
  104. {
  105. var StuSelectLessonListData = openLessonPlanIBLL.GetStuSelectLessonListEntityByJson(queryJson);
  106. var jsonData = new
  107. {
  108. StuSelectLessonList = StuSelectLessonListData,
  109. };
  110. return Success(jsonData);
  111. }
  112. #endregion
  113. #region 提交数据
  114. /// <summary>
  115. /// 删除实体数据
  116. /// <param name="keyValue">主键</param>
  117. /// <summary>
  118. /// <returns></returns>
  119. [HttpPost]
  120. [AjaxOnly]
  121. public ActionResult DeleteForm(string keyValue)
  122. {
  123. openLessonPlanIBLL.DeleteEntity(keyValue);
  124. return Success("删除成功!");
  125. }
  126. /// <summary>
  127. /// 保存实体数据(新增、修改)
  128. /// <param name="keyValue">主键</param>
  129. /// <summary>
  130. /// <returns></returns>
  131. [HttpPost]
  132. [ValidateAntiForgeryToken]
  133. [AjaxOnly]
  134. public ActionResult SaveForm(string keyValue, string strEntity)
  135. {
  136. OpenLessonPlanEntity entity = strEntity.ToObject<OpenLessonPlanEntity>();
  137. openLessonPlanIBLL.SaveEntity(keyValue,entity);
  138. return Success("保存成功!");
  139. }
  140. /// <summary>
  141. /// 保存实体数据(新增、修改)
  142. /// <param name="keyValue">主键</param>
  143. /// <summary>
  144. /// <returns></returns>
  145. [HttpPost]
  146. [ValidateAntiForgeryToken]
  147. [AjaxOnly]
  148. public ActionResult SaveFormOfClass(string queryJson, string strEntity)
  149. {
  150. StuSelectLessonListEntity entity = strEntity.ToObject<StuSelectLessonListEntity>();
  151. openLessonPlanIBLL.SaveStuSelectLessonListScaleByJson(queryJson, entity);
  152. return Success("保存成功!");
  153. }
  154. #endregion
  155. }
  156. }