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.6 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.ReceiveSendFeeManagement;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. namespace Learun.Application.Web.Areas.ReceiveSendFeeManagement.Controllers
  7. {
  8. /// <summary>
  9. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  10. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  11. /// 创 建:超级管理员
  12. /// 日 期:2023-02-27 15:25
  13. /// 描 述:工资条
  14. /// </summary>
  15. public class SalaryInfoController : MvcControllerBase
  16. {
  17. private SalaryInfoIBLL salaryInfoIBLL = new SalaryInfoBLL();
  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 IndexPersonal()
  43. {
  44. return View();
  45. }
  46. #endregion
  47. #region 获取数据
  48. /// <summary>
  49. /// 获取页面显示列表数据
  50. /// </summary>
  51. /// <param name="pagination">分页参数</param>
  52. /// <param name="queryJson">查询参数</param>
  53. /// <returns></returns>
  54. [HttpGet]
  55. [AjaxOnly]
  56. public ActionResult GetPageList(string pagination, string queryJson)
  57. {
  58. Pagination paginationobj = pagination.ToObject<Pagination>();
  59. var data = salaryInfoIBLL.GetPageList(paginationobj, queryJson);
  60. var jsonData = new
  61. {
  62. rows = data,
  63. total = paginationobj.total,
  64. page = paginationobj.page,
  65. records = paginationobj.records
  66. };
  67. return Success(jsonData);
  68. }
  69. /// <summary>
  70. /// 获取表单数据
  71. /// </summary>
  72. /// <param name="keyValue">主键</param>
  73. /// <returns></returns>
  74. [HttpGet]
  75. [AjaxOnly]
  76. public ActionResult GetFormData(string keyValue)
  77. {
  78. var SalaryInfoData = salaryInfoIBLL.GetSalaryInfoEntity(keyValue);
  79. var jsonData = new
  80. {
  81. SalaryInfo = SalaryInfoData,
  82. };
  83. return Success(jsonData);
  84. }
  85. #endregion
  86. #region 提交数据
  87. /// <summary>
  88. /// 删除实体数据
  89. /// </summary>
  90. /// <param name="keyValue">主键</param>
  91. /// <returns></returns>
  92. [HttpPost]
  93. [AjaxOnly]
  94. public ActionResult DeleteForm(string keyValue)
  95. {
  96. salaryInfoIBLL.DeleteEntity(keyValue);
  97. return Success("删除成功!");
  98. }
  99. /// <summary>
  100. /// 保存实体数据(新增、修改)
  101. /// </summary>
  102. /// <param name="keyValue">主键</param>
  103. /// <param name="strEntity">实体</param>
  104. /// <returns></returns>
  105. [HttpPost]
  106. [ValidateAntiForgeryToken]
  107. [AjaxOnly]
  108. public ActionResult SaveForm(string keyValue, string strEntity)
  109. {
  110. SalaryInfoEntity entity = strEntity.ToObject<SalaryInfoEntity>();
  111. salaryInfoIBLL.SaveEntity(keyValue, entity);
  112. if (string.IsNullOrEmpty(keyValue))
  113. {
  114. }
  115. return Success("保存成功!");
  116. }
  117. #endregion
  118. }
  119. }