/* Returns tasks thats due date is equal to today */ public void RetrieveTodaysTasks() { foreach (Kompitu.Data.Model.TaskList taskList in _TaskLists) { foreach (Kompitu.Data.Model.Task task in taskList.Tasks. Where(t => IsNotHiddenOrDeleted(t) && t.Status != "completed" && t.Due != DateTime.MinValue && DateTime.Compare(t.Due.Date, DateTime.Today) == 0)) { TodaysTasks.Add(task); } } }
public void RefreshLists() { //fill lists with visible tasks (not hidden and not deleted) VisibleTaskLists.Clear(); RetrieveVisibleLists(); //fill lists with todays tasks TodaysTasks.Clear(); RetrieveTodaysTasks(); //fill list with overdue tasks OverdueTasks.Clear(); RetrieveOverdueTasks(); //fill list with not completed tasks NotCompletedTasks.Clear(); RetrieveNotCompletedTasks(); //fill list with completed tasks CompletedTasks.Clear(); RetrieveCompletedTasks(); }