Beispiel #1
0
        private void SortAndFilterEvents()
        {
            if (!EnableSortingAndFiltering)
            {
                return;
            }

            if (sortFilterPreferences.EnableSorting)
            {
                OthersEvents = service.Sort(OthersEvents, sortFilterPreferences);
            }

            if (sortFilterPreferences.EnableTimeFilter)
            {
                OthersEvents = service.FilterByStartTime(OthersEvents, sortFilterPreferences);
            }

            if (sortFilterPreferences.EnableDayOfWeekFilter)
            {
                OthersEvents = service.FilterByDayOfWeek(OthersEvents, sortFilterPreferences);
            }

            if (sortFilterPreferences.EnableStatusFilter)
            {
                OthersEvents = service.FilterByStatus(OthersEvents, sortFilterPreferences);
            }
        }