예제 #1
0
 private void Edit(Guid consignmentItemId, string instructions)
 {
     try
     {
         _consignmentItemForEdit = _consignmentItemService.Edit(consignmentItemId, instructions);
     }
     catch (DomainValidationException dex)
     {
         _domainValidationException = dex;
     }
 }
예제 #2
0
 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 }));
     }
 }