Пример #1
0
        public async Task <IActionResult> Confirm(BillPayFormModel model)
        {
            Account account = await _acctRepo.GetAcctBpay(model.SenderAccountNumber);

            Payee payee = await _payeeRepo.Get(model.DestinationID);

            NWBASystem.GetInstance().SchedulePayment(account, payee, model.Amount, model.Date, model.Period);
            _acctRepo.Save();

            return(RedirectToAction(nameof(SuccessfulSchedule)));
        }
Пример #2
0
        public async Task <IActionResult> ScheduleBillPay()
        {
            //populates view bags with accounts for dropboxes
            ViewBag.Accounts = await this.GetAccountsForViewBag();

            ViewBag.Payees = await _payeeRepo.GetAll();

            //creates a new form model and gets the current time with three minutes added
            BillPayFormModel formModel = new BillPayFormModel();

            formModel.Date = DateTime.Parse(DateTime.Now.AddMinutes(3).ToString("dd/MM/yyyy HH:mm"));
            return(View(formModel));
        }
Пример #3
0
        public IActionResult Confirm()
        {
            string billpayJson = HttpContext.Session.GetString("BillpayJson");

            if (billpayJson == null)
            {
                return(NotFound());
            }

            BillPayFormModel model = JsonConvert.DeserializeObject <BillPayFormModel>(billpayJson);

            return(View(model));
        }