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.
 
 
 
 
 
 

164 lines
4.9 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-07-18 17:52
  13. /// 描 述:疫情
  14. /// </summary>
  15. public class VaccinationInfoController : MvcControllerBase
  16. {
  17. private VaccinationInfoIBLL vaccinationInfoIBLL = new VaccinationInfoBLL();
  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 TeachIndex()
  43. {
  44. return View();
  45. }
  46. /// <summary>
  47. /// 表单页
  48. /// <summary>
  49. /// <returns></returns>
  50. [HttpGet]
  51. public ActionResult TeachForm()
  52. {
  53. return View();
  54. }
  55. #endregion
  56. #region 获取数据
  57. /// <summary>
  58. /// 获取页面显示列表数据
  59. /// </summary>
  60. /// <param name="pagination">分页参数</param>
  61. /// <param name="queryJson">查询参数</param>
  62. /// <returns></returns>
  63. [HttpGet]
  64. [AjaxOnly]
  65. public ActionResult GetPageList(string pagination, string queryJson)
  66. {
  67. Pagination paginationobj = pagination.ToObject<Pagination>();
  68. var data = vaccinationInfoIBLL.GetPageList(paginationobj, queryJson);
  69. var jsonData = new
  70. {
  71. rows = data,
  72. total = paginationobj.total,
  73. page = paginationobj.page,
  74. records = paginationobj.records
  75. };
  76. return Success(jsonData);
  77. }
  78. /// <summary>
  79. /// 获取页面显示列表数据
  80. /// </summary>
  81. /// <param name="pagination">分页参数</param>
  82. /// <param name="queryJson">查询参数</param>
  83. /// <returns></returns>
  84. [HttpGet]
  85. [AjaxOnly]
  86. public ActionResult GetPageListForTeacher(string pagination, string queryJson)
  87. {
  88. Pagination paginationobj = pagination.ToObject<Pagination>();
  89. var data = vaccinationInfoIBLL.GetPageListForTeacher(paginationobj, queryJson);
  90. var jsonData = new
  91. {
  92. rows = data,
  93. total = paginationobj.total,
  94. page = paginationobj.page,
  95. records = paginationobj.records
  96. };
  97. return Success(jsonData);
  98. }
  99. /// <summary>
  100. /// 获取表单数据
  101. /// </summary>
  102. /// <param name="keyValue">主键</param>
  103. /// <returns></returns>
  104. [HttpGet]
  105. [AjaxOnly]
  106. public ActionResult GetFormData(string keyValue)
  107. {
  108. var VaccinationInfoData = vaccinationInfoIBLL.GetVaccinationInfoEntity(keyValue);
  109. var jsonData = new
  110. {
  111. VaccinationInfo = VaccinationInfoData,
  112. };
  113. return Success(jsonData);
  114. }
  115. #endregion
  116. #region 提交数据
  117. /// <summary>
  118. /// 删除实体数据
  119. /// </summary>
  120. /// <param name="keyValue">主键</param>
  121. /// <returns></returns>
  122. [HttpPost]
  123. [AjaxOnly]
  124. public ActionResult DeleteForm(string keyValue)
  125. {
  126. vaccinationInfoIBLL.DeleteEntity(keyValue);
  127. return Success("删除成功!");
  128. }
  129. /// <summary>
  130. /// 保存实体数据(新增、修改)
  131. /// </summary>
  132. /// <param name="keyValue">主键</param>
  133. /// <param name="strEntity">实体</param>
  134. /// <returns></returns>
  135. [HttpPost]
  136. [ValidateAntiForgeryToken]
  137. [AjaxOnly]
  138. public ActionResult SaveForm(string keyValue, string strEntity)
  139. {
  140. VaccinationInfoEntity entity = strEntity.ToObject<VaccinationInfoEntity>();
  141. vaccinationInfoIBLL.SaveEntity(keyValue, entity);
  142. return Success("保存成功!");
  143. }
  144. #endregion
  145. #region 扩展代码
  146. [HttpPost]
  147. [AjaxOnly]
  148. public ActionResult CreateFrom(string userId,string Description)
  149. {
  150. vaccinationInfoIBLL.CreateEntity(userId, Description);
  151. return Success("生成成功!");
  152. }
  153. #endregion
  154. }
  155. }