예제 #1
0
        /// <summary>
        /// Setzt in der GUI die Ausgaben dieses und des letzten Jahres.
        /// </summary>
        private void SetExpenses()
        {
            CashClosureHelper helper = new CashClosureHelper(false);
            int currentYear = DateTime.Now.Year;

            //Expenses of this year
            DateTime from = BookingsHelper.makeDateSmall(new DateTime(currentYear, 1, 1));
            DateTime to = BookingsHelper.makeDateGreat(DateTime.Today);
            expensesThisYear = helper.getAllExpensesForPeriod(from, to);

            //Expenses of last year
            from = BookingsHelper.makeDateSmall(new DateTime(currentYear - 1, 1, 1));
            to = BookingsHelper.makeDateGreat(new DateTime(currentYear - 1, 12, 31));
            expensesLastYear = helper.getAllExpensesForPeriod(from, to);

            lExpensesThisYear.Content = SafeStringParser.safeParseToMoney(expensesThisYear, true);
            lExpensesLastYear.Content = SafeStringParser.safeParseToMoney(expensesLastYear, true);
        }