コード例 #1
0
        protected void btCreateAccount_Click(object sender, EventArgs e)
        {
            BankAccountCreateRequest createAccountRequest = new BankAccountCreateRequest();

            createAccountRequest.CustomerName = this.txtCustomerRef.Text;
            ApplicationBankAccountService service = new ApplicationBankAccountService();

            service.CreateBankAccount(createAccountRequest);

            ShowAllAccounts();
        }
コード例 #2
0
 public IActionResult Edit(BankAccountView vm)
 {
     if (ModelState.IsValid)
     {
         BankAccountCreateRequest createAccountRequest = new BankAccountCreateRequest();
         createAccountRequest.CustomerName = vm.CustomerRef;
         _bankService.CreateBankAccount(createAccountRequest);
         return(RedirectToAction("Index"));
     }
     else
     {
         //there is something wrong with the data values
         return(View(vm));
     }
 }