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.
 
 
 
 
 
 

146 lines
4.2 KiB

  1. using System;
  2. using Learun.Util;
  3. using System.Data;
  4. using Learun.Application.TwoDevelopment.AssetManagementSystem;
  5. using System.Web.Mvc;
  6. using System.Collections.Generic;
  7. namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
  8. {
  9. /// <summary>
  10. /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园
  11. /// Copyright (c) 2013-2018 北京泉江科技有限公司
  12. /// 创 建:超级管理员
  13. /// 日 期:2019-03-26 11:41
  14. /// 描 述:入库申请明细
  15. /// </summary>
  16. public class Ass_AssetsInfoItemApplyController : MvcControllerBase
  17. {
  18. private Ass_AssetsInfoItemApplyIBLL ass_AssetsInfoItemApplyIBLL = new Ass_AssetsInfoItemApplyBLL();
  19. #region 视图功能
  20. /// <summary>
  21. /// 主页面
  22. /// <summary>
  23. /// <returns></returns>
  24. [HttpGet]
  25. public ActionResult Index()
  26. {
  27. return View();
  28. }
  29. /// <summary>
  30. /// 表单页
  31. /// <summary>
  32. /// <returns></returns>
  33. [HttpGet]
  34. public ActionResult Form()
  35. {
  36. return View();
  37. }
  38. /// <summary>
  39. /// 表单页
  40. /// <summary>
  41. /// <returns></returns>
  42. [HttpGet]
  43. public ActionResult FormJYHC()
  44. {
  45. ViewBag.AAICode = CommonHelper.CreateNo();
  46. return View();
  47. }
  48. /// <summary>
  49. /// 表单页
  50. /// <summary>
  51. /// <returns></returns>
  52. [HttpGet]
  53. public ActionResult FormJY()
  54. {
  55. ViewBag.AAICode = CommonHelper.CreateNo();
  56. return View();
  57. }
  58. /// <summary>
  59. /// 采购表单页
  60. /// <summary>
  61. /// <returns></returns>
  62. [HttpGet]
  63. public ActionResult FormPurchase()
  64. {
  65. ViewBag.AssCode = DateTime.Now.ToString("yyyyMMddHHmmssffff");
  66. return View();
  67. }
  68. #endregion
  69. #region 获取数据
  70. /// <summary>
  71. /// 获取页面显示列表数据
  72. /// <summary>
  73. /// <param name="queryJson">查询参数</param>
  74. /// <returns></returns>
  75. [HttpGet]
  76. [AjaxOnly]
  77. public ActionResult GetPageList(string pagination, string queryJson)
  78. {
  79. Pagination paginationobj = pagination.ToObject<Pagination>();
  80. var data = ass_AssetsInfoItemApplyIBLL.GetPageList(paginationobj, queryJson);
  81. var jsonData = new
  82. {
  83. rows = data,
  84. total = paginationobj.total,
  85. page = paginationobj.page,
  86. records = paginationobj.records
  87. };
  88. return Success(jsonData);
  89. }
  90. /// <summary>
  91. /// 获取表单数据
  92. /// <summary>
  93. /// <returns></returns>
  94. [HttpGet]
  95. [AjaxOnly]
  96. public ActionResult GetFormData(string keyValue)
  97. {
  98. var Ass_AssetsInfoItemApplyData = ass_AssetsInfoItemApplyIBLL.GetAss_AssetsInfoItemApplyEntity(keyValue);
  99. var jsonData = new
  100. {
  101. Ass_AssetsInfoItemApply = Ass_AssetsInfoItemApplyData,
  102. };
  103. return Success(jsonData);
  104. }
  105. #endregion
  106. #region 提交数据
  107. /// <summary>
  108. /// 删除实体数据
  109. /// <param name="keyValue">主键</param>
  110. /// <summary>
  111. /// <returns></returns>
  112. [HttpPost]
  113. [AjaxOnly]
  114. public ActionResult DeleteForm(string keyValue)
  115. {
  116. ass_AssetsInfoItemApplyIBLL.DeleteEntity(keyValue);
  117. return Success("删除成功!");
  118. }
  119. /// <summary>
  120. /// 保存实体数据(新增、修改)
  121. /// <param name="keyValue">主键</param>
  122. /// <summary>
  123. /// <returns></returns>
  124. [HttpPost]
  125. [ValidateAntiForgeryToken]
  126. [AjaxOnly]
  127. public ActionResult SaveForm(string keyValue, string strEntity)
  128. {
  129. Ass_AssetsInfoItemApplyEntity entity = strEntity.ToObject<Ass_AssetsInfoItemApplyEntity>();
  130. ass_AssetsInfoItemApplyIBLL.SaveEntity(keyValue, entity);
  131. return Success("保存成功!");
  132. }
  133. #endregion
  134. }
  135. }