Example #1
0
 private void EditPendingConsignmentItem(Guid id, Guid jobItemId, Guid supplierId, string instructions)
 {
     try
     {
         _pendingItemForEdit = _consignmentItemService.EditPending(id, jobItemId, supplierId, instructions);
     }
     catch (DomainValidationException dex)
     {
         _domainValidationException = dex;
     }
 }
Example #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 }));
     }
 }