public IActionResult OnPostUpdateDetail() { try { var modifiedCount = _salesOrderDetailService.Update(SalesOrderDetail); } catch (Exception e) { return(StatusCode(500, e.Message)); } return(RedirectToPage("./Edit", new { id = SalesOrderDetail.SalesOrderID })); }
public IActionResult AddSalesOrderDetailPartial(SalesOrderDetailVM model) { if (!ModelState.IsValid) { return(PartialView("AddEditSalesOrderDetailModalPartial", model)); } if (string.IsNullOrEmpty(model.SalesOrderDetails.Id)) { salesOrderDetailService.Insert(model.SalesOrderDetails); } else { salesOrderDetailService.Update(model.SalesOrderDetails); } model.isSuccess = true; return(PartialView("AddEditSalesOrderDetailModalPartial", model)); }