Exemplo n.º 1
0
 public AuthController(IBusinessUser authService, ITokenHelper tokenHelper, IBusinessCustomer customerService, IBusinessAccount accountService, IBusinessTransaction transactionService)
 {
     _authService        = authService;
     _tokenHelper        = tokenHelper;
     _customerService    = customerService;
     _accountService     = accountService;
     _transactionService = transactionService;
 }
Exemplo n.º 2
0
        public ActionResult SavingtoChecking()
        {
            Transfer         chkToSav = new Transfer();
            string           username = HttpContext.User.Identity.Name;
            IBusinessAccount iba      = GenericFactory <BusinessLayer, IBusinessAccount> .CreateInstance();

            string chkAcctNum = iba.GetCheckingAccountNumber(username);

            chkToSav.chkBalance    = iba.GetCheckingBalance(chkAcctNum);
            chkToSav.savBalance    = iba.GetSavingBalance(chkAcctNum + "1");
            chkToSav.amtToTransfer = 0;
            chkToSav.status        = "";
            return(View(chkToSav));
        }
Exemplo n.º 3
0
    void ShowTransferHistory(string chkAcctNum)
    {
        try
        {
            IBusinessAccount iba = GenericFactory <BusinessLayer, IBusinessAccount> .CreateInstance();

            List <TransferHistory> TList = iba.GetTransferHistory(chkAcctNum);
            gv1.DataSource = TList;
            gv1.DataBind();
        }
        catch (Exception ex)
        {
            lblStatus.Text = ex.Message;
        }
    }
Exemplo n.º 4
0
        public ActionResult SavingtoChecking(Transfer savToChk)
        {
            string           username = HttpContext.User.Identity.Name;
            IBusinessAccount iba      = GenericFactory <BusinessLayer, IBusinessAccount> .CreateInstance();

            string chkAcctNum = iba.GetCheckingAccountNumber(username);

            bool res = iba.TransferSavToChk(chkAcctNum + "1", chkAcctNum, savToChk.amtToTransfer);

            if (res == true)
            {
                savToChk.chkBalance = iba.GetCheckingBalance(chkAcctNum);
                savToChk.savBalance = iba.GetSavingBalance(chkAcctNum + "1");
                savToChk.status     = "Amount transferred Successfully!";
            }
            else
            {
                savToChk.status = "Amount transfer is not successful..";
            }
            return(View(savToChk));
        }
Exemplo n.º 5
0
 public AccountController(IBusinessAccount accountService)
 {
     _accountService = accountService;
 }