private void button3_Click(object sender, EventArgs e) { TaskSer cs = new TaskSer(); List <Tasks> tk = cs.GetAllSortByTittle(cat_ID); LoadTaskList(tk); }
private void button3_Click(object sender, EventArgs e) { 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.GetAllSortByTittle(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); } }