public JsonResult Insert_ProdRecMaster(ProdReceiptVM ProdReceiptVM) { bool result = false; DealerCode = Session["DealerCode"].ToString(); string msg = "Failed to save record.."; result = VehReceiptMethods.Insert_ProdMaster(ProdReceiptVM, DealerCode, ref msg); if (result) { msg = "Successfully Added"; } return(Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet)); }
public JsonResult Insert_ProdRecMaster(ProdReceiptVM ProdReceipt) { bool result = false; DealerCode = Session["DealerCode"].ToString(); string msg = "Failed to save record.."; if (ProdReceipt.RecNo != null && ProdReceipt.RecNo != "0") { if (Core.CRM.ADO.SecurityBll.UserRights("2015", "003")) { result = VehReceiptMethods.Insert_ProdMaster(ProdReceipt, DealerCode, ref msg); if (result) { msg = "Successfully Added"; } } else { msg = "You dn't have a right! Please Contact to Administrator"; result = false; } } else { result = VehReceiptMethods.Insert_ProdMaster(ProdReceipt, DealerCode, ref msg); if (result) { msg = "Successfully Added"; } } return Json(new { Success = result, Message = msg }, JsonRequestBehavior.AllowGet); }