Esempio n. 1
0
        public async Task <IActionResult> Statements()
        {
            var customer = await CMgr.GetCustomerAsync(CustomerID);

            var viewModel = new BasicOpViewModel
            {
                Customer = customer
            };

            return(View(viewModel));
        }
Esempio n. 2
0
        public async Task <IActionResult> Statements(BasicOpViewModel viewModel)
        {
            var customer = await CMgr.GetCustomerAsync(CustomerID);

            viewModel.Customer = customer;

            viewModel.Validate(ModelState);
            if (!ModelState.IsValid)
            {
                return(View(viewModel));
            }

            HttpContext.Session.SetInt32(statementsResultSessionKey, viewModel.Account.AccountNumber);

            return(RedirectToAction("StatementsResult"));
        }