Exemplo n.º 1
0
        public async Task <IActionResult> CreateClientAccountForm(CreateClientAccountViewModel createClientAccountViewModel)
        {
            if (ModelState.IsValid)
            {
                //сохранение счета
                var account = createClientAccountViewModel.Account;
                await _bankAccountRepository.SaveAccount(account : account);

                return(RedirectToAction(actionName: "GetAccounts", controllerName: "BankAccount", routeValues: createClientAccountViewModel));
            }

            return(View());
        }
Exemplo n.º 2
0
        public async Task <IActionResult> CreateClientAccountForm(CreateClientAccountViewModel createClientAccountViewModel)
        {
            if (ModelState.IsValid)
            {
                //сохранение счета
                await _accountRepository.SaveAccount(createClientAccountViewModel.Account);

                return(RedirectToAction("GetAccounts", "BankAccount",
                                        new { idClient = createClientAccountViewModel.Account.IdClient }));
            }

            return(View());
        }