public double GetBudgetAmountByPeriod(int year, int period)
        {
            AccountBudget Budget = GetBudget(year, period);

            if (Budget == null)
            {
                return(0);
            }
            return(Budget.Amount);
        }
        public double GetAccountBalance(int year, int period, bool budgets)
        {
            double sum = 0;

            if (budgets)
            {
                AccountBudget _obj = RepositoryMgr.AccountBudgetMgr.FindByAccountYearPeriod(AccountID, year, period);
                if (_obj != null)
                {
                    sum += _obj.Amount;
                }
            }
            else
            {
                AccountActivity _obj = RepositoryMgr.AccountActivityMgr.FindByAccountYearPeriod(AccountID, year, period);
                if (_obj != null)
                {
                    sum += _obj.Amount;
                }
            }


            return(sum);
        }