Ejemplo n.º 1
0
 /// <summary>
 /// Sums both Income & Expense DataLists.
 /// </summary>
 public void UpdateData()
 {
     if (ExpenseDataList != null)
     {
         IncomeTotal   = IncomeDataList.Sum(x => x.Amount);
         ExpenseTotal  = ExpenseDataList.Sum(x => x.Amount);
         NetDifference = IncomeTotal - ExpenseTotal;
     }
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Sums the Expense DataList Values. Sorts all Expense SubCategories.
        /// </summary>
        public void UpdateExpense()
        {
            ExpenseTotal  = ExpenseDataList.Sum(x => x.Amount);
            NetDifference = IncomeTotal - ExpenseTotal;

            if (Expense.AllExpenseCategories != null)
            {
                Expense.AllExpenseCategories =
                    SortCategories(ExpenseDataList.ToList(), Expense.AllExpenseCategories);
            }
        }