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.

165 lines
4.6 KiB

  1. using NFine.Application.DHAY;
  2. using NFine.Code;
  3. using System;
  4. using System.Collections.Generic;
  5. using System.Data;
  6. using System.Linq;
  7. using System.Reflection.Emit;
  8. using System.Web;
  9. using System.Web.Mvc;
  10. namespace NFine.Web.Areas.DHAY.Controllers
  11. {
  12. public class ICSCustomerSuppliedInController : ControllerBase
  13. {
  14. ICSCustomerSuppliedInApp App = new ICSCustomerSuppliedInApp();
  15. // GET: DHAY/ICSCustomerSuppliedReturn
  16. public ActionResult Index()
  17. {
  18. return View();
  19. }
  20. public ActionResult Create()
  21. {
  22. return View();
  23. }
  24. public ActionResult GetInvCode()
  25. {
  26. return View();
  27. }
  28. public ActionResult Update()
  29. {
  30. return View();
  31. }
  32. public ActionResult GetWHCode()
  33. {
  34. return View();
  35. }
  36. [HttpPost]
  37. [HandlerAjaxOnly]
  38. [ValidateAntiForgeryToken]
  39. public ActionResult DeleteICSOtherIn(string keyValue)
  40. {
  41. string msg = App.DeleteICSOtherIn(keyValue);
  42. if (string.IsNullOrEmpty(msg))
  43. {
  44. return Success("删除成功!");
  45. }
  46. else
  47. {
  48. return Error(msg);
  49. }
  50. }
  51. [HttpPost]
  52. [HandlerAjaxOnly]
  53. public ActionResult SaveICSOtherIn(string ICSASN)
  54. {
  55. string msg = App.SaveICSOtherIn(ICSASN);
  56. if (!string.IsNullOrEmpty(msg))
  57. {
  58. return Error(msg);
  59. }
  60. else
  61. {
  62. return Success("添加成功!");
  63. }
  64. }
  65. [HttpGet]
  66. public ActionResult GetICSOtherIn(Pagination pagination,string queryJson)
  67. {
  68. DataTable ListData = App.GetICSOtherIn(ref pagination, queryJson);
  69. var JsonData = new
  70. {
  71. total = pagination.total,
  72. page = pagination.page,
  73. records = pagination.records,
  74. rows = ListData,
  75. };
  76. return Content(JsonData.ToJson());
  77. }
  78. [HttpGet]
  79. public ActionResult GetICSOtherInByInCode(string InCode)
  80. {
  81. DataTable ListData = App.GetICSOtherInByInCode(InCode);
  82. var JsonData = new
  83. {
  84. rows = ListData,
  85. };
  86. return Content(JsonData.ToJson());
  87. }
  88. [HttpGet]
  89. [HandlerAjaxOnly]
  90. public ActionResult GetICSOtherInDetail(string InCode, string queryJson, Pagination pagination)
  91. {
  92. DataTable ListData = App.GetICSOtherInDetail(InCode, queryJson, ref pagination);
  93. var JsonData = new
  94. {
  95. total = pagination.total,
  96. page = pagination.page,
  97. records = pagination.records,
  98. rows = ListData,
  99. };
  100. return Content(JsonData.ToJson());
  101. }
  102. [HttpPost]
  103. [HandlerAjaxOnly]
  104. [ValidateAntiForgeryToken]
  105. public ActionResult DeleteICSOtherInByCode(string keyValue)
  106. {
  107. string msg = App.DeleteICSOtherInByCode(keyValue);
  108. if (string.IsNullOrEmpty(msg))
  109. {
  110. return Success("删除成功!");
  111. }
  112. else
  113. {
  114. return Error(msg);
  115. }
  116. }
  117. public ActionResult GetBidCode(string WorkPoint)
  118. {
  119. try
  120. {
  121. string Code = App.GetBidCode(WorkPoint);
  122. var JsonData = new
  123. {
  124. Code = Code,
  125. };
  126. return Content(JsonData.ToJson());
  127. }
  128. catch (Exception ex)
  129. {
  130. return Error(ex.Message);
  131. }
  132. }
  133. [HttpPost]
  134. [HandlerAjaxOnly]
  135. public ActionResult UpdateICSOtherIn(string ICSASN)
  136. {
  137. string msg = App.UpdateICSOtherIn(ICSASN);
  138. if (!string.IsNullOrEmpty(msg))
  139. {
  140. return Error(msg);
  141. }
  142. else
  143. {
  144. return Success("修改成功!");
  145. }
  146. }
  147. public ActionResult GetICSReturnTemporary(string rfqno, Pagination pagination)
  148. {
  149. DataTable table = App.GetICSReturnTemporary(rfqno);
  150. var JsonData = new
  151. {
  152. total = pagination.total,
  153. page = pagination.page,
  154. records = pagination.records,
  155. rows = table
  156. };
  157. return Content(JsonData.ToJson());
  158. }
  159. }
  160. }