Exemple #1
0
 public ActionResult CreateFixedPrice(CreateFixedPriceViewModel model)
 {
     if(!this.ModelState.IsValid)
     {
         return View(model);
     }
     WorkerServices.CreateFixedPriceJobOrder(model);
     return Redirect("/Accountancy/JobOrder");
 }
 public void CreateFixedPriceJobOrder(CreateFixedPriceViewModel model)
 {
     var command = new RegisterFixedPriceJobOrderCommand(
             model.Customer.OriginalId,
             model.Customer.Name,
             model.Manager.OriginalId,
             model.Manager.Name,
             model.Price.Amount,
             model.Price.Currency,
             model.DateOfStart,
             model.DueDate,
             model.Name,
             model.PurchaseOrderNumber,
             model.Description
         );
     Bus.Send(command);
 }
 public CreateFixedPriceViewModel GetCreateFixedPriceViewModel()
 {
     var model = new CreateFixedPriceViewModel();
     model.DateOfStart = DateTime.Now;
     model.DueDate = DateTime.Now;
     return model;
 }