public static int GetToDoCountByWeek(ToDoListWeekManager toDoListWeekManager) { int currentWeek = DateTime.Now.DayOfYear / 7; int currentYear = DateTime.Now.Year; return(toDoListWeekManager.GetAll().Where(x => x.Week == currentWeek && x.Year == currentYear).ToList().Count); }
public static int GetToDoCountAll(ToDoListTodayManager today, ToDoListWeekManager week, ToDoListMonthManager month) { int countToday = today.GetAll().Count; int countWeek = week.GetAll().Count; int countMonth = month.GetAll().Count; int result = countToday + countWeek + countMonth; return(result); }