Example #1
0
        private async Task <IncomesListModel> LoadIncomesAsync(int pageNumber = 1)
        {
            if (Filter.DateFromAsDateTime != null && Filter.DateToAsDateTime != null)
            {
                var incomes = await _incomesQueries.GetIncomesByMonth(
                    Filter.DateFromAsDateTime.Value, Filter.DateToAsDateTime.Value, new PaginationArgs
                {
                    IncludeDeleted = false,
                    ItemsPerPage   = _userSettings.ItemsPerPage,
                    PageNumber     = pageNumber
                });

                IsDataValid = true;
                return(incomes);
            }
            else
            {
                IsDataValid = false;
            }
            return(null);
        }