public ActionResult Create(AccountViewModel vm) { if (!ModelState.IsValid) { return(View(vm)); } CommandStackWorkerService.AddAccount(vm); return(RedirectToAction("Details", new { id = vm.CustomerId })); }
public ActionResult Add(CustomerViewModel vm) { if (!ModelState.IsValid) { return(View(vm)); } CommandStackWorkerService.AddCustomer(vm); return(RedirectToAction("Index")); }
public ActionResult TransferMoney(TransferViewModel vm) { if (!ModelState.IsValid) { return(View(vm)); } if (vm.Amount == 0) { return(RedirectToAction("Index")); } CommandStackWorkerService.TransferMoney(vm); return(RedirectToAction("Details", new { id = vm.CustomerId })); }
public ActionResult EditAddress(AddressViewModel vm) { if (!ModelState.IsValid) { return(View(vm)); } if (!this.ÎsAddressDirty(vm)) { return(RedirectToAction("Details", new { id = vm.AggregateId })); } CommandStackWorkerService.EditAddressDetails(vm); return(RedirectToAction("Details", new { id = vm.AggregateId })); }
public ActionResult EditCustomer(PersonViewModel vm) { if (!ModelState.IsValid) { return(View(vm)); } if (!this.IsPersonDirty(vm)) { return(RedirectToAction("Details", new { id = vm.AggregateId })); } CommandStackWorkerService.EditPersonDetails(vm); return(RedirectToAction("Details", new { id = vm.AggregateId })); }
public ActionResult UnlockAccount(Guid accountId, Guid customerId) { CommandStackWorkerService.UnlockAccount(accountId); return(RedirectToAction("Details", new { id = customerId })); }
public ActionResult DeleteCustomer(Guid id) { CommandStackWorkerService.DeleteCustomer(id); return(RedirectToAction("Details", new { id = id })); }