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.
 
 
 
 
 
 

125 lines
3.7 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. /// 日 期:2020-02-03 14:44
  13. /// 描 述:疫情详细信息
  14. /// </summary>
  15. public class ContactsDetailsController : MvcControllerBase
  16. {
  17. private ContactsDetailsIBLL contactsDetailsIBLL = new ContactsDetailsBLL();
  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="pagination">分页参数</param>
  43. /// <param name="queryJson">查询参数</param>
  44. /// <returns></returns>
  45. [HttpGet]
  46. [AjaxOnly]
  47. public ActionResult GetPageList(string pagination, string queryJson)
  48. {
  49. Pagination paginationobj = pagination.ToObject<Pagination>();
  50. var data = contactsDetailsIBLL.GetPageList(paginationobj, queryJson);
  51. var jsonData = new
  52. {
  53. rows = data,
  54. total = paginationobj.total,
  55. page = paginationobj.page,
  56. records = paginationobj.records
  57. };
  58. return Success(jsonData);
  59. }
  60. /// <summary>
  61. /// 获取页面显示列表数据
  62. /// <summary>
  63. /// <param name="queryJson">查询参数</param>
  64. /// <returns></returns>
  65. [HttpGet]
  66. [AjaxOnly]
  67. public ActionResult GetList(string queryJson)
  68. {
  69. var data = contactsDetailsIBLL.GetList(queryJson);
  70. return Success(data);
  71. }
  72. /// <summary>
  73. /// 获取表单数据
  74. /// <summary>
  75. /// <returns></returns>
  76. [HttpGet]
  77. [AjaxOnly]
  78. public ActionResult GetFormData(string keyValue)
  79. {
  80. var ContactsDetailsData = contactsDetailsIBLL.GetContactsDetailsEntity( keyValue );
  81. var jsonData = new {
  82. ContactsDetails = ContactsDetailsData,
  83. };
  84. return Success(jsonData);
  85. }
  86. #endregion
  87. #region 提交数据
  88. /// <summary>
  89. /// 删除实体数据
  90. /// <param name="keyValue">主键</param>
  91. /// <summary>
  92. /// <returns></returns>
  93. [HttpPost]
  94. [AjaxOnly]
  95. public ActionResult DeleteForm(string keyValue)
  96. {
  97. contactsDetailsIBLL.DeleteEntity(keyValue);
  98. return Success("删除成功!");
  99. }
  100. /// <summary>
  101. /// 保存实体数据(新增、修改)
  102. /// <param name="keyValue">主键</param>
  103. /// <summary>
  104. /// <returns></returns>
  105. [HttpPost]
  106. [ValidateAntiForgeryToken]
  107. [AjaxOnly]
  108. public ActionResult SaveForm(string keyValue, string strEntity)
  109. {
  110. UserInfo userInfo = LoginUserInfo.Get(); ContactsDetailsEntity entity = strEntity.ToObject<ContactsDetailsEntity>();
  111. contactsDetailsIBLL.SaveEntity(userInfo,keyValue,entity);
  112. return Success("保存成功!");
  113. }
  114. #endregion
  115. }
  116. }