예제 #1
0
        public static int GetToDoCountByToday(ToDoListTodayManager toDoListTodayManager)
        {
            int currentDay   = DateTime.Now.Day;
            int currentMonth = DateTime.Now.Month;
            int currentYear  = DateTime.Now.Year;

            return(toDoListTodayManager.GetAll().Where(x => x.Day == currentDay && x.Month == currentMonth && x.Year == currentYear).ToList().Count);
        }
예제 #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);
        }
 void ShowData()
 {
     if (toDoType == "Ozel")
     {
         int currentDay   = DateTime.Now.Day;
         int currentMonth = DateTime.Now.Month;
         int currentYear  = DateTime.Now.Year;
         dataGridView1.DataSource         = toDoListTodayManager.GetAll().Where(x => x.Day == currentDay).ToList();
         dataGridView1.Columns[0].Visible = false;
         dataGridView1.Columns[2].Visible = false;
         dataGridView1.Columns[3].Visible = false;
         dataGridView1.Columns[4].Visible = false;
         dataGridView1.Columns[5].Visible = false;
     }
     else
     {
         dataGridView1.DataSource = toDoListTodayManager.GetAll();
     }
 }
예제 #4
0
        public void ShowToDoListToday()
        {
            listBox1.Items.Clear();
            int currentDay             = DateTime.Now.Day;
            int currentMonth           = DateTime.Now.Month;
            int currentYear            = DateTime.Now.Year;
            List <ToDoListToday> todos = toDoListTodayManager.GetAll().Where(x => x.Day == currentDay && x.Month == currentMonth && x.Year == currentYear).ToList();

            for (int i = 0; i < todos.Count; i++)
            {
                listBox1.Items.Add((i + 1).ToString() + " - " + todos[i].Title + " - " + todos[i].Completed);
            }
        }