Esempio n. 1
0
        public ActionResult List()
        {
            IEnumerable <bankaccount> bankaccountList = BankAccountRepository.GetAllBankAccount();

            ViewBag.RecordCount = bankaccountList.Count();
            return(PartialView(bankaccountList));
        }
        public ActionResult Index()
        {
            try
            {
                var bankAccounts = _bAccountRepository.GetAllBankAccount(int.Parse(Session["partnerId"].ToString()));


                return(View(bankAccounts));
            }
            catch (Exception ex)
            {
                ViewBag.Error = ex.Message;
                return(View("Error"));
            }
        }
Esempio n. 3
0
        public ActionResult GetCurrentBankBalance()
        {
            bankbalance Lastbalance = new bankbalance();
            IEnumerable <bankaccount> bankaccount = BankAccountRepository.GetAllBankAccount();

            foreach (bankaccount bank in bankaccount)
            {
                Lastbalance = BankBalanceRepository.GetLastBankBlance(bank.bankAccountID);
                if (Lastbalance == null)
                {
                    bank.BeginningBalance          = IncomeRepository.GetIncomeTotalByBankAccount(bank.bankAccountID, bank.DateEntered, System.DateTime.Today);
                    bank.CurrentRevenueTotalAmount = IncomeRepository.GetPendingIncomeTotalByBankAccount(bank.bankAccountID);
                    bank.CurrentExpenseTotalAmount = ExpenseRepository.GetPendingExpenseTotalByBankAccount(bank.bankAccountID);
                }
                else
                {
                    bank.BeginningBalance          = Lastbalance.EndingBalance;
                    bank.CurrentRevenueTotalAmount = IncomeRepository.GetPendingIncomeTotalByBankAccount(bank.bankAccountID);
                    bank.CurrentExpenseTotalAmount = ExpenseRepository.GetPendingExpenseTotalByBankAccount(bank.bankAccountID);
                }
            }
            return(PartialView(bankaccount));
        }