Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 
 

147 linhas
4.3 KiB

  1. using Learun.Util;
  2. using System.Data;
  3. using Learun.Application.TwoDevelopment.LogisticsManagement;
  4. using System.Web.Mvc;
  5. using System.Collections.Generic;
  6. using System;
  7. using System.Linq;
  8. namespace Learun.Application.Web.Areas.LogisticsManagement.Controllers
  9. {
  10. /// <summary>
  11. /// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
  12. /// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
  13. /// 创 建:超级管理员
  14. /// 日 期:2021-06-21 15:49
  15. /// 描 述:项目管理
  16. /// </summary>
  17. public class ProjectManageController : MvcControllerBase
  18. {
  19. private ProjectManageIBLL projectManageIBLL = new ProjectManageBLL();
  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="pagination">分页参数</param>
  45. /// <param name="queryJson">查询参数</param>
  46. /// <returns></returns>
  47. [HttpGet]
  48. [AjaxOnly]
  49. public ActionResult GetPageList(string pagination, string queryJson)
  50. {
  51. Pagination paginationobj = pagination.ToObject<Pagination>();
  52. var data = projectManageIBLL.GetPageList(paginationobj, queryJson);
  53. var jsonData = new
  54. {
  55. rows = data,
  56. total = paginationobj.total,
  57. page = paginationobj.page,
  58. records = paginationobj.records
  59. };
  60. return Success(jsonData);
  61. }
  62. /// <summary>
  63. /// 获取页面显示列表数据
  64. /// </summary>
  65. /// <param name="pagination">分页参数</param>
  66. /// <param name="queryJson">查询参数</param>
  67. /// <returns></returns>
  68. [HttpGet]
  69. [AjaxOnly]
  70. public ActionResult GetList(string queryJson)
  71. {
  72. var data = projectManageIBLL.GetList(queryJson).OrderByDescending(x => x.CreateTime);
  73. return Success(data);
  74. }
  75. /// <summary>
  76. /// 获取表单数据
  77. /// </summary>
  78. /// <param name="keyValue">主键</param>
  79. /// <returns></returns>
  80. [HttpGet]
  81. [AjaxOnly]
  82. public ActionResult GetFormData(string keyValue)
  83. {
  84. var ProjectManageData = projectManageIBLL.GetProjectManageEntity(keyValue);
  85. var jsonData = new
  86. {
  87. ProjectManage = ProjectManageData,
  88. };
  89. return Success(jsonData);
  90. }
  91. #endregion
  92. #region 提交数据
  93. /// <summary>
  94. /// 删除实体数据
  95. /// </summary>
  96. /// <param name="keyValue">主键</param>
  97. /// <returns></returns>
  98. [HttpPost]
  99. [AjaxOnly]
  100. public ActionResult DeleteForm(string keyValue)
  101. {
  102. projectManageIBLL.DeleteEntity(keyValue);
  103. return Success("删除成功!");
  104. }
  105. /// <summary>
  106. /// 保存实体数据(新增、修改)
  107. /// </summary>
  108. /// <param name="keyValue">主键</param>
  109. /// <param name="strEntity">实体</param>
  110. /// <returns></returns>
  111. [HttpPost]
  112. [ValidateAntiForgeryToken]
  113. [AjaxOnly]
  114. public ActionResult SaveForm(string keyValue, string strEntity)
  115. {
  116. ProjectManageEntity entity = strEntity.ToObject<ProjectManageEntity>();
  117. projectManageIBLL.SaveEntity(keyValue, entity);
  118. return Success("保存成功!");
  119. }
  120. /// <summary>
  121. /// 删除实体数据
  122. /// </summary>
  123. /// <param name="keyValue">主键</param>
  124. /// <returns></returns>
  125. [HttpPost]
  126. [AjaxOnly]
  127. public ActionResult UpdateStatus(string keyValue,string Status)
  128. {
  129. projectManageIBLL.UpdateStatus(keyValue, Status);
  130. return Success("操作成功!");
  131. }
  132. #endregion
  133. }
  134. }