Esempio n. 1
0
 void ShowData()
 {
     if (toDoType == "Ozel")
     {
         int currentMonth = DateTime.Now.Month;
         int currentYear  = DateTime.Now.Year;
         dataGridView1.DataSource         = toDoListMonthManager.GetAll().Where(x => x.Month == currentMonth && x.Year == currentYear).ToList();
         dataGridView1.Columns[0].Visible = false;
         dataGridView1.Columns[3].Visible = false;
         dataGridView1.Columns[4].Visible = false;
     }
     else
     {
         dataGridView1.DataSource = toDoListMonthManager.GetAll();
     }
 }
Esempio n. 2
0
        public static int GetToDoCountByMonth(ToDoListMonthManager toDoListMonthManager)
        {
            int currentMonth = DateTime.Now.Month;
            int currentYear  = DateTime.Now.Year;

            return(toDoListMonthManager.GetAll().Where(x => x.Month == currentMonth && x.Year == currentYear).ToList().Count);
        }
Esempio n. 3
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);
        }
Esempio n. 4
0
        public void ShowToDoListMonth()
        {
            listBox3.Items.Clear();
            int currentMonth           = DateTime.Now.Month;
            int currentYear            = DateTime.Now.Year;
            List <ToDoListMonth> todos = toDoListMonthManager.GetAll().Where(x => x.Month == currentMonth && x.Year == currentYear).ToList();

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