public void AssignIncomingInvoiceToJobOrder(AssignIncomingInvoiceToJobOrderViewModel model, string jobOrderNumber)
        {
            var jobOrderId = (from j in Database.JobOrders
                              where j.Number == jobOrderNumber
                              select j.OriginalId).Single();
            var command = new AssociateIncomingInvoiceToJobOrderCommand(model.InvoiceOriginalId, jobOrderId);

            Bus.Send(command);
        }
Example #2
0
 public ActionResult AssignIncomingInvoiceToJobOrder(AssignIncomingInvoiceToJobOrderViewModel model)
 {
     if (!this.ModelState.IsValid)
     {
         return(View(model));
     }
     WorkerServices.AssignIncomingInvoiceToJobOrder(model);
     return(Redirect("/Accountancy/"));
 }