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.

TeacherDimissionController.cs 3.5 KiB

4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 Learun.Application.Organization;
  7. namespace Learun.Application.Web.Areas.PersonnelManagement.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2019-03-19 16:42
  14. /// 描 述:离职教职工
  15. /// </summary>
  16. public class TeacherDimissionController : MvcControllerBase
  17. {
  18. private TeacherDimissionIBLL teacherDimissionIBLL = new TeacherDimissionBLL();
  19. private UserIBLL userIBLL = new UserBLL();
  20. #region 视图功能
  21. /// <summary>
  22. /// 主页面
  23. /// <summary>
  24. /// <returns></returns>
  25. [HttpGet]
  26. public ActionResult Index()
  27. {
  28. return View();
  29. }
  30. /// <summary>
  31. /// 表单页
  32. /// <summary>
  33. /// <returns></returns>
  34. [HttpGet]
  35. public ActionResult Form()
  36. {
  37. return View();
  38. }
  39. #endregion
  40. #region 获取数据
  41. /// <summary>
  42. /// 获取页面显示列表数据
  43. /// <summary>
  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 = teacherDimissionIBLL.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. /// <returns></returns>
  65. [HttpGet]
  66. [AjaxOnly]
  67. public ActionResult GetFormData(string keyValue)
  68. {
  69. var TeacherDimissionData = teacherDimissionIBLL.GetTeacherDimissionEntity(keyValue);
  70. var jsonData = new
  71. {
  72. TeacherDimission = TeacherDimissionData,
  73. };
  74. return Success(jsonData);
  75. }
  76. #endregion
  77. #region 提交数据
  78. /// <summary>
  79. /// 删除实体数据
  80. /// <param name="keyValue">主键</param>
  81. /// <summary>
  82. /// <returns></returns>
  83. [HttpPost]
  84. [AjaxOnly]
  85. public ActionResult DeleteForm(string keyValue)
  86. {
  87. var entity = teacherDimissionIBLL.GetTeacherDimissionEntity(keyValue);
  88. teacherDimissionIBLL.DeleteEntity(keyValue);
  89. return Success("删除成功!");
  90. }
  91. /// <summary>
  92. /// 保存实体数据(新增、修改)
  93. /// <param name="keyValue">主键</param>
  94. /// <summary>
  95. /// <returns></returns>
  96. [HttpPost]
  97. [ValidateAntiForgeryToken]
  98. [AjaxOnly]
  99. public ActionResult SaveForm(string keyValue, string strEntity)
  100. {
  101. TeacherDimissionEntity entity = strEntity.ToObject<TeacherDimissionEntity>();
  102. teacherDimissionIBLL.SaveEntity(keyValue, entity);
  103. return Success("保存成功!");
  104. }
  105. #endregion
  106. }
  107. }