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.
 
 
 
 
 
 

156 lines
4.5 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 Index1()
  36. {
  37. return View();
  38. }
  39. /// <summary>
  40. /// 表单页
  41. /// <summary>
  42. /// <returns></returns>
  43. [HttpGet]
  44. public ActionResult Form()
  45. {
  46. return View();
  47. }
  48. #endregion
  49. #region 获取数据
  50. /// <summary>
  51. /// 获取页面显示列表数据
  52. /// </summary>
  53. /// <param name="pagination">分页参数</param>
  54. /// <param name="queryJson">查询参数</param>
  55. /// <returns></returns>
  56. [HttpGet]
  57. [AjaxOnly]
  58. public ActionResult GetPageList(string pagination, string queryJson)
  59. {
  60. Pagination paginationobj = pagination.ToObject<Pagination>();
  61. var data = projectManageIBLL.GetPageList(paginationobj, queryJson);
  62. var jsonData = new
  63. {
  64. rows = data,
  65. total = paginationobj.total,
  66. page = paginationobj.page,
  67. records = paginationobj.records
  68. };
  69. return Success(jsonData);
  70. }
  71. /// <summary>
  72. /// 获取页面显示列表数据
  73. /// </summary>
  74. /// <param name="pagination">分页参数</param>
  75. /// <param name="queryJson">查询参数</param>
  76. /// <returns></returns>
  77. [HttpGet]
  78. [AjaxOnly]
  79. public ActionResult GetList(string queryJson)
  80. {
  81. var data = projectManageIBLL.GetList(queryJson).OrderByDescending(x => x.CreateTime);
  82. return Success(data);
  83. }
  84. /// <summary>
  85. /// 获取表单数据
  86. /// </summary>
  87. /// <param name="keyValue">主键</param>
  88. /// <returns></returns>
  89. [HttpGet]
  90. [AjaxOnly]
  91. public ActionResult GetFormData(string keyValue)
  92. {
  93. var ProjectManageData = projectManageIBLL.GetProjectManageEntity(keyValue);
  94. var jsonData = new
  95. {
  96. ProjectManage = ProjectManageData,
  97. };
  98. return Success(jsonData);
  99. }
  100. #endregion
  101. #region 提交数据
  102. /// <summary>
  103. /// 删除实体数据
  104. /// </summary>
  105. /// <param name="keyValue">主键</param>
  106. /// <returns></returns>
  107. [HttpPost]
  108. [AjaxOnly]
  109. public ActionResult DeleteForm(string keyValue)
  110. {
  111. projectManageIBLL.DeleteEntity(keyValue);
  112. return Success("删除成功!");
  113. }
  114. /// <summary>
  115. /// 保存实体数据(新增、修改)
  116. /// </summary>
  117. /// <param name="keyValue">主键</param>
  118. /// <param name="strEntity">实体</param>
  119. /// <returns></returns>
  120. [HttpPost]
  121. [ValidateAntiForgeryToken]
  122. [AjaxOnly]
  123. public ActionResult SaveForm(string keyValue, string strEntity)
  124. {
  125. ProjectManageEntity entity = strEntity.ToObject<ProjectManageEntity>();
  126. projectManageIBLL.SaveEntity(keyValue, entity);
  127. return Success("保存成功!");
  128. }
  129. /// <summary>
  130. /// 删除实体数据
  131. /// </summary>
  132. /// <param name="keyValue">主键</param>
  133. /// <returns></returns>
  134. [HttpPost]
  135. [AjaxOnly]
  136. public ActionResult UpdateStatus(string keyValue,string Status)
  137. {
  138. projectManageIBLL.UpdateStatus(keyValue, Status);
  139. return Success("操作成功!");
  140. }
  141. #endregion
  142. }
  143. }