public void Update(long id, AwbAdminModel model) { var data = _awbRepository.Get(id).First(); _gtdHelper.ProcessGtd(data, model.GTD); _manager.Update(id, model); }
public void Update(long id, AwbAdminModel model) { var old = _awbs.Get(id).First(); AddBrokerEvent(id, old.BrokerId, model.BrokerId); _manager.Update(id, model); }
public virtual ActionResult Edit(long id, AwbBrokerModel model) { try { if (ModelState.IsValid) { _awbUpdateManager.Update(id, model); return(RedirectToAction(MVC.BrokerAwb.Edit(id))); } var data = _awbRepository.Get(id).First(); BindBag(data); return(View(model)); } catch (UnexpectedStateException ex) { if (ex.StateId == _stateConfig.CargoIsCustomsClearedStateId) { var data = _awbRepository.Get(id).First(); return(View("Message", (object)string.Format(Pages.CantEditAirWaybill, data.Bill))); } throw; } }
public virtual ActionResult Edit(long id, AwbAdminModel model) { try { if (ModelState.IsValid) { _awbUpdateManager.Update(id, model); return(RedirectToAction(MVC.AdminAwb.Edit(id))); } } catch (DublicateException) { ModelState.AddModelError("Bill", Validation.AirWaybillAlreadyExists); } BindBag(id); return(View(model)); }