public ActionResult MarkJobOrderAsCompleted(MarkJobOrderAsCompletedViewModel model) { if (!this.ModelState.IsValid) { return(View(model)); } WorkerServices.MarkJobOrderAsCompleted(model); return(Redirect("/Accountancy/JobOrder")); }
public MarkJobOrderAsCompletedViewModel GetMarkJobOrderAsCompletedViewModel(Guid jobOrderId) { var jobOrder = Repository.GetById <Merp.Accountancy.CommandStack.Model.JobOrder>(jobOrderId); var model = new MarkJobOrderAsCompletedViewModel(); model.DateOfCompletion = DateTime.Now; model.CustomerName = string.Empty; model.JobOrderId = jobOrder.Id; model.JobOrderNumber = jobOrder.Number; model.JobOrderName = jobOrder.Name; return(model); }
public void MarkJobOrderAsCompleted(MarkJobOrderAsCompletedViewModel model) { var command = new MarkJobOrderAsCompletedCommand(model.JobOrderId, model.DateOfCompletion); Bus.Send(command); }