public ActionResult Register(RegisterViewModel model) { if (!this.ModelState.IsValid) { return View(model); } WorkerServices.Register(model); return Redirect("/Accountancy/"); }
public void Register(RegisterViewModel model) { var command = new RegisterIncomingInvoiceCommand( model.InvoiceNumber, model.Date, model.Amount, model.Taxes, model.TotalPrice, model.Description, model.PaymentTerms, model.PurchaseOrderNumber, model.Supplier.OriginalId, model.Supplier.Name, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty, string.Empty ); Bus.Send(command); }
public RegisterViewModel GetRegisterViewModel() { var model = new RegisterViewModel(); model.Date = DateTime.Now; return model; }