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.
 
 
 
 
 
 

129 lines
3.8 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. using System;
  7. namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  11. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2021-03-08 10:36
  14. /// 描 述:会议通知
  15. /// </summary>
  16. public class MeetingNoticeController : MvcControllerBase
  17. {
  18. private MeetingNoticeIBLL meetingNoticeIBLL = new MeetingNoticeBLL();
  19. #region 视图功能
  20. /// <summary>
  21. /// 主页面
  22. /// <summary>
  23. /// <returns></returns>
  24. [HttpGet]
  25. public ActionResult Index()
  26. {
  27. return View();
  28. }
  29. /// <summary>
  30. /// 表单页
  31. /// <summary>
  32. /// <returns></returns>
  33. [HttpGet]
  34. public ActionResult Form()
  35. {
  36. return View();
  37. }
  38. #endregion
  39. #region 获取数据
  40. /// <summary>
  41. /// 获取页面显示列表分页数据
  42. /// <summary>
  43. /// <param name="pagination">分页参数</param>
  44. /// <param name="queryJson">查询参数</param>
  45. /// <returns></returns>
  46. [HttpGet]
  47. [AjaxOnly]
  48. public ActionResult GetPageList(string pagination, string queryJson)
  49. {
  50. Pagination paginationobj = pagination.ToObject<Pagination>();
  51. var data = meetingNoticeIBLL.GetPageList(paginationobj, queryJson);
  52. var jsonData = new
  53. {
  54. rows = data,
  55. total = paginationobj.total,
  56. page = paginationobj.page,
  57. records = paginationobj.records
  58. };
  59. return Success(jsonData);
  60. }
  61. /// <summary>
  62. /// 获取页面显示列表数据
  63. /// <summary>
  64. /// <param name="queryJson">查询参数</param>
  65. /// <returns></returns>
  66. [HttpGet]
  67. [AjaxOnly]
  68. public ActionResult GetList(string queryJson)
  69. {
  70. var data = meetingNoticeIBLL.GetList(queryJson);
  71. return Success(data);
  72. }
  73. /// <summary>
  74. /// 获取表单数据
  75. /// <summary>
  76. /// <returns></returns>
  77. [HttpGet]
  78. [AjaxOnly]
  79. public ActionResult GetFormData(string keyValue)
  80. {
  81. var MeetingNoticeData = meetingNoticeIBLL.GetMeetingNoticeEntity( keyValue );
  82. var jsonData = new {
  83. MeetingNotice = MeetingNoticeData,
  84. };
  85. return Success(jsonData);
  86. }
  87. #endregion
  88. #region 提交数据
  89. /// <summary>
  90. /// 删除实体数据
  91. /// <param name="keyValue">主键</param>
  92. /// <summary>
  93. /// <returns></returns>
  94. [HttpPost]
  95. [AjaxOnly]
  96. public ActionResult DeleteForm(string keyValue)
  97. {
  98. meetingNoticeIBLL.DeleteEntity(keyValue);
  99. return Success("删除成功!");
  100. }
  101. /// <summary>
  102. /// 保存实体数据(新增、修改)
  103. /// <param name="keyValue">主键</param>
  104. /// <summary>
  105. /// <returns></returns>
  106. [HttpPost]
  107. [ValidateAntiForgeryToken]
  108. [AjaxOnly]
  109. public ActionResult SaveForm(string keyValue, string strEntity)
  110. {
  111. UserInfo userInfo = LoginUserInfo.Get();
  112. MeetingNoticeEntity entity = strEntity.ToObject<MeetingNoticeEntity>();
  113. entity.CreateTime = DateTime.Now;
  114. entity.CreateUser = userInfo.userId;
  115. meetingNoticeIBLL.SaveEntity(userInfo,keyValue,entity);
  116. return Success("保存成功!");
  117. }
  118. #endregion
  119. }
  120. }