private void button2_Click(object sender, EventArgs e)
        {
            TaskSer      cs = new TaskSer();
            List <Tasks> tk = cs.GetAllSortByDate(cat_ID);

            LoadTaskList(tk);
        }
Exemplo n.º 2
0
        public void RefreshContent()
        {
            flowLayoutPanel1Today.Controls.Clear();
            List <Tasks> tk;
            TaskSer      cs     = new TaskSer();
            CategorySer  cg     = new CategorySer();
            int          cat_Id = cg.GetCategoryID(ProjectName, LogIn.user_ID);

            //MessageBox.Show(ProjectName);
            //MessageBox.Show(cat_Id.ToString());
            cg = new CategorySer();
            tk = cs.GetAllSortByDate(cat_Id);

            for (int i = 0; i < tk.Count; i++)
            {
                AddTaskInfo ad = new AddTaskInfo();
                ad.Tittle  = tk[i].Tittle;
                ad.Date    = Convert.ToDateTime(tk[i].Date).ToLongDateString();
                ad.Task_ID = tk[i].Task_ID;
                flowLayoutPanel1Today.Controls.Add(ad);
            }
        }