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.
 
 
 
 
 
 

114 lines
3.3 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.PersonnelManagement;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  10. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2019-09-28 13:25
  13. /// 描 述:工作总结
  14. /// </summary>
  15. public class WP_WorkSummaryController : MvcControllerBase
  16. {
  17. private WP_WorkSummaryIBLL wP_WorkSummaryIBLL = new WP_WorkSummaryBLL();
  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. #endregion
  38. #region 获取数据
  39. /// <summary>
  40. /// 获取页面显示列表数据
  41. /// <summary>
  42. /// <param name="queryJson">查询参数</param>
  43. /// <returns></returns>
  44. [HttpGet]
  45. [AjaxOnly]
  46. public ActionResult GetPageList(string pagination, string queryJson)
  47. {
  48. Pagination paginationobj = pagination.ToObject<Pagination>();
  49. var data = wP_WorkSummaryIBLL.GetPageList(paginationobj, queryJson);
  50. var jsonData = new
  51. {
  52. rows = data,
  53. total = paginationobj.total,
  54. page = paginationobj.page,
  55. records = paginationobj.records
  56. };
  57. return Success(jsonData);
  58. }
  59. /// <summary>
  60. /// 获取表单数据
  61. /// <summary>
  62. /// <returns></returns>
  63. [HttpGet]
  64. [AjaxOnly]
  65. public ActionResult GetFormData(string keyValue)
  66. {
  67. var WP_WorkSummaryData = wP_WorkSummaryIBLL.GetWP_WorkSummaryEntity(keyValue);
  68. var jsonData = new
  69. {
  70. WP_WorkSummary = WP_WorkSummaryData,
  71. };
  72. return Success(jsonData);
  73. }
  74. #endregion
  75. #region 提交数据
  76. /// <summary>
  77. /// 删除实体数据
  78. /// <param name="keyValue">主键</param>
  79. /// <summary>
  80. /// <returns></returns>
  81. [HttpPost]
  82. [AjaxOnly]
  83. public ActionResult DeleteForm(string keyValue)
  84. {
  85. wP_WorkSummaryIBLL.DeleteEntity(keyValue);
  86. return Success("删除成功!");
  87. }
  88. /// <summary>
  89. /// 保存实体数据(新增、修改)
  90. /// <param name="keyValue">主键</param>
  91. /// <summary>
  92. /// <returns></returns>
  93. [HttpPost]
  94. [ValidateAntiForgeryToken]
  95. [AjaxOnly]
  96. [ValidateInput(false)]
  97. public ActionResult SaveForm(string keyValue, string strEntity)
  98. {
  99. WP_WorkSummaryEntity entity = strEntity.ToObject<WP_WorkSummaryEntity>();
  100. wP_WorkSummaryIBLL.SaveEntity(keyValue, entity);
  101. return Success("保存成功!");
  102. }
  103. #endregion
  104. }
  105. }