public ActionResult Index(PassbookVM vm) { BankingServices bankService = new BankingServices(_dbContext); vm.AccountNo = Convert.ToInt32(Session["acntno"]); vm.accountTransactionsList = bankService.GetSingleAccountTransaction(vm.AccountNo); bankService.DownloadeStatement(vm.accountTransactionsList); return(View(vm)); }
// GET: Passbook public ActionResult Index() { BankingServices bankServices = new BankingServices(_bankDBContext); PassbookVM passbookVM = new PassbookVM(); if (!CheckSession()) { return(RedirectToAction("Index", "Login")); } passbookVM.AccountNo = Convert.ToInt32(Session["account"]); TempData["transactions"] = bankServices.GetSingleAccountTransaction(passbookVM.AccountNo); passbookVM.accountTransactions = TempData["transactions"] as List <AccountTransaction>; return(View(passbookVM)); }
// GET: Passbook public ActionResult Index() { if (Session["acntno"] == null) { return(RedirectToAction("Index", "Login")); } PassbookVM vm = new PassbookVM(); BankingServices bankService = new BankingServices(_dbContext); vm.AccountNo = Convert.ToInt32(Session["acntno"]); vm.accountTransactionsList = bankService.GetSingleAccountTransaction(vm.AccountNo); return(View(vm)); }