示例#1
0
        public IActionResult AddBankDetail()
        {
            var viewModel = new BankDetailView
            {
                BankList = _unitOfWork.BanksRepository.Items.ToList(),
            };


            return(View(viewModel));
        }
示例#2
0
        public IActionResult SaveBankDetail(BankDetailView viewModel)
        {
            var accountModel = HttpContext.Session
                               .GetObjectFromJson <AccountDetailView>("AccountDetailView");

            if (accountModel.UserDetail == null)
            {
                accountModel.BankDetail = new BankDetailView();
            }

            accountModel.BankDetail = viewModel;

            HttpContext.Session.SetObjectAsJson("AccountDetailView", accountModel);

            return(RedirectToAction("AddStaffDetail"));
        }