public ActionResult ExtendFixedPrice(ExtendFixedPriceViewModel model)
 {
     if (!this.ModelState.IsValid)
     {
         return(View(model));
     }
     WorkerServices.ExtendFixedPriceJobOrder(model);
     return(Redirect("/Accountancy/JobOrder"));
 }
Exemple #2
0
        public ExtendFixedPriceViewModel GetExtendFixedPriceViewModel(Guid jobOrderId)
        {
            var jobOrder = Repository.GetById <Merp.Accountancy.CommandStack.Model.FixedPriceJobOrder>(jobOrderId);
            var model    = new ExtendFixedPriceViewModel();

            model.NewDueDate     = jobOrder.DueDate;
            model.Price          = jobOrder.Price.Amount;
            model.JobOrderNumber = jobOrder.Number;
            model.JobOrderId     = jobOrder.Id;
            model.JobOrderName   = jobOrder.Name;
            model.CustomerName   = jobOrder.Customer.Name;
            return(model);
        }
Exemple #3
0
        public void ExtendFixedPriceJobOrder(ExtendFixedPriceViewModel model)
        {
            var command = new ExtendFixedPriceJobOrderCommand(model.JobOrderId, model.NewDueDate, model.Price);

            Bus.Send(command);
        }