//public ActionResult GetProductAvailability(string productid, string productname, string showroomselected, string storagelocationname, string uomname) //{ // try // { // List<MaterialIndentDTO> lstproductavailble = mmsTransactions.GetProductAvailability(productid, productname, showroomselected, storagelocationname, uomname); // var varavailability = new { productavailability = lstproductavailble }; // return new JsonResult { Data = varavailability, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; // } // catch (Exception ex) // { // throw ex; // } //} public ActionResult Deleteproductdetails(MaterialIndentDTO gridrowdata) { bool isdeleted = false; try { isdeleted = mmsTransactions.Deleteproductdetails(gridrowdata); var result = new { Success = isdeleted }; var data = new JsonResult { Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; return(data); } catch (Exception ex) { throw ex; } }
public JsonResult UpdateIndentDetails(List <MaterialIndentDTO> griddata, MaterialIndentDTO BE) { bool isupdated = false; try { int modifiedby = Convert.ToInt32(this.Session["UserId"]); BE.createdby = modifiedby; isupdated = mmsTransactions.UpdateIndentDetails(griddata, BE); var result = new { Success = isupdated }; var data = new JsonResult { Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; return(data); } catch (Exception ex) { throw ex; } }
//public ActionResult GetAvailaibilityQty(string productid, string productname, string uomname, string storagearea, string shelfname) //{ // List<MaterialIndentDTO> lstproductavailble = new List<MaterialIndentDTO>(); // decimal availableqty = 0; // if (productid != null && productname != null && storagearea != null && shelfname != null) // { // availableqty = mmsTransactions.GetProductAvailabilityQty(productid, productname, uomname, storagearea, shelfname); // } // else // { // shelfname = ""; // availableqty = mmsTransactions.GetProductAvailabilityQty(productid, productname, uomname, storagearea, shelfname); // } // var AvailaibilityQty = new { AvailbleQty = availableqty }; // return new JsonResult { Data = AvailaibilityQty, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; //} public JsonResult SaveIndentDetails(List <MaterialIndentDTO> griddata, MaterialIndentDTO BE) { bool issaved = false; try { int userid = Convert.ToInt32(this.Session["UserId"]); BE.createdby = userid; string indentno = ""; issaved = mmsTransactions.SaveIndent(griddata, BE, out indentno); var result = new { Success = issaved, indentno = indentno }; var data = new JsonResult { Data = result, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; return(data); } catch (Exception ex) { throw ex; } }