Esempio n. 1
0
 public ActionResult XferHistory()
 {
     ViewBag.Message = "Transfer History page.";
     TransferModels tm = new TransferModels();
     if (SessionFacade.USERNAME == null)
     {
         SessionFacade.PAGEREQUESTED = Request.ServerVariables["SCRIPT_NAME"];
         return RedirectToAction("Login", "Home");
     }
     try
     {
         IBusinessAccount iba = GenericFactory<BusinessLayer, IBusinessAccount>.CreateInstance();
         List<TransferHistory> TList = iba.GetTransferHistory(SessionFacade.CHECKINGACCTNUM);
         tm.TransferHisList = TList;
     }
     catch (Exception ex)
     {
         //lblStatus.Text = ex.Message;
     }
     return View(tm);
 }
Esempio n. 2
0
        public ActionResult XferChkToSav()
        {
            ViewBag.Message = "Your Transfer page.";
            TransferModels tm = new TransferModels();
            if (SessionFacade.USERNAME == null)
            {
                SessionFacade.PAGEREQUESTED = Request.ServerVariables["SCRIPT_NAME"];
                return RedirectToAction("Login", "Home");
            }

            IBusinessAccount iba = GenericFactory<BusinessLayer, IBusinessAccount>.CreateInstance();
            string chkAcctNum = SessionFacade.CHECKINGACCTNUM;
            string savAcctNum = chkAcctNum + "1";
            tm.CheckingBalance = iba.GetCheckingBalance(chkAcctNum).ToString();
            tm.SavingBalance = iba.GetSavingBalance(savAcctNum).ToString();

            return View(tm);
        }
Esempio n. 3
0
 public ActionResult XferChkToSav(TransferModels tm)
 {
     ViewBag.Message = "Your Transfer page.";
     IBusinessAccount iba = GenericFactory<BusinessLayer, IBusinessAccount>.CreateInstance();
     try
     {
         string chkAcctNum = SessionFacade.CHECKINGACCTNUM;
         string savAcctNum = chkAcctNum + "1";
         if (iba.TransferFromChkgToSav(chkAcctNum, savAcctNum,
             double.Parse(tm.Amount.ToString())))
         {
             //lblStatus.Text = "Transfer successful..";
             tm.CheckingBalance = iba.GetCheckingBalance(chkAcctNum).ToString();
             tm.SavingBalance = iba.GetSavingBalance(savAcctNum).ToString();
             tm.Amount = 0;
         }
     }
     catch (Exception ex)
     {
         //lblStatus.Text = ex.Message;
     }
     return View(tm);
 }