Пример #1
0
        public async Task <ActionResult> UpdateCarrierDetails(Carrier carrierDetails)
        {
            if (ModelState.IsValid)
            {
                var response = await _carrierService.UpdateCarrier(carrierDetails);

                return(Json(response));
            }
            else
            {
                return(Json(new { success = false, responseText = "Customer Save Failed" }));
            }
        }
Пример #2
0
 public ActionResult EditCarrier(CarrierModel model)
 {
     ViewData["CarrierTypes"] = CarrierTypes;
     if (ModelState.IsValid)
     {
         if (model.Id > 0)
         {
             carrierService.UpdateCarrier(model);
         }
         else
         {
             carrierService.InsertCarrier(model);
         }
         return(Json(1));
     }
     return(PartialView("_CarrieFormEdit", model));
 }