public JsonResult Save(int id, string keyColumn, string prod, string listAst, string qty, string qtyBook, string ordlineID, int ordID, string listLoc, int lineID) { List <string> prodID = new List <string>(); if (prod != null && prod.Trim().Length > 0) { prodID = JsonConvert.DeserializeObject <List <string> >(prod); } List <string> Attributes = new List <string>(); if (listAst != null && listAst.Trim().Length > 0) { Attributes = JsonConvert.DeserializeObject <List <string> >(listAst); } List <string> quantity = new List <string>(); if (qty != null && qty.Trim().Length > 0) { quantity = JsonConvert.DeserializeObject <List <string> >(qty); } List <string> qtybook = new List <string>(); if (qtyBook != null && qtyBook.Trim().Length > 0) { qtybook = JsonConvert.DeserializeObject <List <string> >(qtyBook); } List <string> olineID = new List <string>(); if (ordlineID != null && ordlineID.Trim().Length > 0) { olineID = JsonConvert.DeserializeObject <List <string> >(ordlineID); } List <string> Locators = new List <string>(); if (listLoc != null && listLoc.Trim().Length > 0) { Locators = JsonConvert.DeserializeObject <List <string> >(listLoc); } VIS.Models.InfoProductModel model = new Models.InfoProductModel(); var value = model.SetProductQty(id, keyColumn, prodID, Attributes, quantity, qtybook, olineID, ordID, Locators, lineID, Session["ctx"] as Ctx); return(Json(new { result = value }, JsonRequestBehavior.AllowGet)); }
public JsonResult Save(int id, string keyColumn, string prod, string C_UOM_ID, string listAst, string qty, int locatorTo, int lineID, string InvCountID, string ReferenceNo, int Locator_ID, int WindowID, int ContainerID, int ContainerToID) { List <string> prodID = new List <string>(); if (prod != null && prod.Trim().Length > 0) { prodID = JsonConvert.DeserializeObject <List <string> >(prod); } List <string> uomID = new List <string>(); if (C_UOM_ID != null && C_UOM_ID.Trim().Length > 0) { uomID = JsonConvert.DeserializeObject <List <string> >(C_UOM_ID); } List <string> Attributes = new List <string>(); if (listAst != null && listAst.Trim().Length > 0) { Attributes = JsonConvert.DeserializeObject <List <string> >(listAst); } List <string> quantity = new List <string>(); if (qty != null && qty.Trim().Length > 0) { quantity = JsonConvert.DeserializeObject <List <string> >(qty); } List <string> countID = new List <string>(); if (InvCountID != null && InvCountID.Trim().Length > 0) { countID = JsonConvert.DeserializeObject <List <string> >(InvCountID); } List <string> RefNo = new List <string>(); if (ReferenceNo != null && ReferenceNo.Trim().Length > 0) { RefNo = JsonConvert.DeserializeObject <List <string> >(ReferenceNo); } VIS.Models.InfoProductModel model = new Models.InfoProductModel(); var value = model.SetProductQty(id, keyColumn, prodID, uomID, Attributes, quantity, locatorTo, lineID, countID, RefNo, Locator_ID, WindowID, ContainerID, ContainerToID, Session["ctx"] as Ctx); return(Json(JsonConvert.SerializeObject(value), JsonRequestBehavior.AllowGet)); }