using NFine.Application.WMS; using NFine.Code; using System; using System.Collections.Generic; using System.Data; using System.Linq; using System.Web; using System.Web.Mvc; namespace NFine.Web.Areas.WMS.Controllers { public class ICSODeliveryNoticeController : ControllerBase { ICSODeliveryNoticeApp App = new ICSODeliveryNoticeApp(); // GET: WMS/ICSODeliveryNotice public ActionResult ICSODeliveryNoticeApplyNeg() { return View(); } public ActionResult ICSODeliveryNoticeApplyNegAdd() { return View(); } public ActionResult ICSODeliveryNoticeApplyNegUpdate() { return View(); } public ActionResult SeachICSODeliveryNotice() { return View(); } public ActionResult SeachInventory() { return View(); } [HttpGet] [HandlerAjaxOnly] public ActionResult GetODeliveryNoticeApplyNegDetail(string ApplyNegCode, Pagination pagination) { DataTable ListData = App.GetODeliveryNoticeApplyNegDetail(ApplyNegCode, ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } [HttpPost] [HandlerAjaxOnly] [ValidateAntiForgeryToken] public ActionResult DeleteICSODeliveryNoticeApplyNeg(string keyValue) { string msg = App.DeleteICSODeliveryNoticeApplyNeg(keyValue); if (string.IsNullOrEmpty(msg)) { return Success("删除成功!"); } else { return Error(msg); } } /// /// 汇总 /// /// /// [HttpGet] public ActionResult GetODeliveryNoticeApplyNeg(Pagination pagination) { DataTable ListData = App.GetODeliveryNoticeApplyNeg(ref pagination); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = ListData, }; return Content(JsonData.ToJson()); } /// /// 修改弹出框的数据来源 /// /// /// /// public ActionResult GetICSODeliveryNoticeReturnTemporary(string IssueCode, Pagination pagination) { DataTable table = App.GetICSODeliveryNoticeReturnTemporary(IssueCode); var JsonData = new { total = pagination.total, page = pagination.page, records = pagination.records, rows = table }; return Content(JsonData.ToJson()); } public ActionResult GetOOCode(string WorkPoint) { try { string Code = App.GetCode(WorkPoint); var JsonData = new { Code = Code, }; return Content(JsonData.ToJson()); } catch (Exception ex) { return Error(ex.Message); } } /// /// 新增 /// /// /// [HttpPost] [HandlerAjaxOnly] public ActionResult SaveICSODeliveryNoticeApplyNeg(string ICSASN) { string msg = App.SaveICSODeliveryNoticeApplyNeg(ICSASN); if (!string.IsNullOrEmpty(msg)) { return Error(msg); } else { return Success("添加成功!"); } } /// /// 修改 /// /// /// [HttpPost] [HandlerAjaxOnly] public ActionResult UpdateICSODeliveryNoticeApplyNeg(string ICSASN) { string msg = App.UpdateICSODeliveryNoticeApplyNeg(ICSASN); if (!string.IsNullOrEmpty(msg)) { return Error(msg); } else { return Success("修改成功!"); } } } }