예제 #1
0
        /// <summary>
        /// Datum "Von" aktualisieren
        /// </summary>
        /// <param name="dateFrom">Datum "von"</param>
        private void dateFromProcessingFunction(DateTime dateFrom)
        {
            this.dateFrom = BookingsHelper.makeDateSmall(dateFrom);

            // Filtere nach Datum
            List <BookingDataGridModel> bookingModels = this.bookingModelsUnchanged.Where(b => this.dateFrom < b.date && b.date < this.dateTo).ToList();

            // Filtere Buchungen nach ausgewähltem Konto
            bookingModels = filterBookingModels(bookingModels);
            refreshDataGrid(bookingModels);
        }
예제 #2
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);
        }