示例#1
0
        public async Task LoadDataRange(DateTime startDateTime, DateTime endDateTime)
        {
            var date = startDateTime;

            while (date <= endDateTime)
            {
                foreach (var item in _dBhandler.GetMonthDataFromDb(date))
                {
                    Expenses.Add(item);
                }

                date = date.AddMonths(1);
            }

            CalcStats();
        }
示例#2
0
        public async Task LoadData(DateTime dateTime)
        {
            _loadedDataTime = dateTime;
            Expenses.Clear();

            foreach (var item in _dBhandler.GetMonthDataFromDb(dateTime))
            {
                Expenses.Add(item);
            }

            if (Expenses.Count < 1)
            {
                Expenses.Add(new ExpensesObj("Income", "Salary", 0, 1000, new Guid()));
            }

            CalcStats();
        }