Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }