예제 #1
0
        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();
            }
        }
예제 #2
0
 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
     };
 }
예제 #3
0
 public ActionResult Create()
 {
     var account = new BankAccountModel();
     return View(account);
 }