public ActionResult Create(BankAccountModel bankAccountModel) { try { // TODO: Add insert logic here var accountDetails = _bankAccountPresenter.ApplyForAccount(bankAccountModel); var account = _bankAccountPresenter.ApplyForAccount(bankAccountModel); return RedirectToAction("Index"); } catch { return View(); } }
public AccountDetailsModel ApplyForAccount(BankAccountModel bankAccount) { var account = _gatewayController.CreateCustomer(new Customer() { AnnualGrossSalary = bankAccount.AnnualGrossSalary, AnnualNetSalary = bankAccount.AnnualNetSalary, BirthDate = bankAccount.BirthDate, FirstName = bankAccount.FirstName, LastName = bankAccount.LastName, Nationality = bankAccount.Nationality, PersonalId = bankAccount.PersonalId, PostCode = bankAccount.PostCode }); return new AccountDetailsModel() { AccountNo = account.AccountNo, SortCode = account.SortCode }; }
public ActionResult Create() { var account = new BankAccountModel(); return View(account); }