コード例 #1
0
        public IActionResult OnPostUpdateDetail()
        {
            try
            {
                var modifiedCount = _salesOrderDetailService.Update(SalesOrderDetail);
            }
            catch (Exception e)
            {
                return(StatusCode(500, e.Message));
            }

            return(RedirectToPage("./Edit", new { id = SalesOrderDetail.SalesOrderID }));
        }
コード例 #2
0
 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));
 }