private void Edit(Guid consignmentItemId, string instructions) { try { _consignmentItemForEdit = _consignmentItemService.Edit(consignmentItemId, instructions); } catch (DomainValidationException dex) { _domainValidationException = dex; } }
public ActionResult EditItem(ConsignmentEditViewModel viewmodel) { if (viewmodel.IsPending) { _consignmentItemService.EditPending( viewmodel.Id, viewmodel.JobItemId, viewmodel.SupplierId, viewmodel.Instructions); return(RedirectToAction("PendingConsignments", "Consignment")); } else { _consignmentItemService.Edit( viewmodel.Id, viewmodel.Instructions); return(RedirectToAction("ConsignmentItems", "Consignment", new { consignmentId = viewmodel.ConsignmentId })); } }