private void button5_Click(object sender, EventArgs e)
        {
            if (!button5.Text.Equals("Show Uncompleted Task"))
            {
                button5.Text = "Show Uncompleted Task";
                flowLayoutPanel1Today.Controls.Clear();

                TaskSer      cs = new TaskSer();
                List <Tasks> tk = cs.GetAllCompleteOrNotTask(1, 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;
                    Bitmap img = new Bitmap("C:\\Users\\sajib\\source\\repos\\Task Manager\\image\\checkmark.png");
                    ad.Icon = img;
                    flowLayoutPanel1Today.Controls.Add(ad);
                }
            }
            else
            {
                button5.Text = "Show Completed Task";


                TaskSer      cs = new TaskSer();
                List <Tasks> tk = cs.GetAll(cat_ID);

                LoadTaskList(tk);
            }
        }
Exemple #2
0
        private void ShareCategroyTasks_Load(object sender, EventArgs e)
        {
            TaskSer tS = new TaskSer();

            tk = tS.GetAllCompleteOrNotTask(0, cat_ID);
            for (int i = 0; i < tk.Count; i++)
            {
                cBCategory.Items.Add(tk[i].Tittle);
            }
        }
Exemple #3
0
        private void button5_Click(object sender, EventArgs e)
        {
            if (!button5.Text.Equals("Show Uncompleted Task"))
            {
                button5.Text = "Show Uncompleted Task";
                flowLayoutPanel1Today.Controls.Clear();
                List <Tasks> tk;
                TaskSer      cs = new TaskSer();

                CategorySer cg     = new CategorySer();
                int         cat_Id = cg.GetCategoryID(ProjectName, LogIn.user_ID);
                //tk = cs.GetAll(cat_Id);
                cg = new CategorySer();
                tk = cs.GetAllCompleteOrNotTask(1, cat_Id);

                for (int i = 0; i < tk.Count; i++)
                {
                    AddTaskInfo ad = new AddTaskInfo();
                    ad.Tittle = tk[i].Tittle;
                    //DateTime dt = DateTime.Parse(tk[i].Date, "dddd, dd MMMM yyyy");
                    ad.Date    = Convert.ToDateTime(tk[i].Date).ToLongDateString();
                    ad.Task_ID = tk[i].Task_ID;
                    Bitmap img = new Bitmap("C:\\Users\\sajib\\source\\repos\\Task Manager\\image\\checkmark.png");
                    ad.Icon = img;
                    flowLayoutPanel1Today.Controls.Add(ad);
                }
            }
            else
            {
                button5.Text = "Show Completed Task";
                flowLayoutPanel1Today.Controls.Clear();
                List <Tasks> tk;
                TaskSer      cs     = new TaskSer();
                CategorySer  cg     = new CategorySer();
                int          cat_Id = cg.GetCategoryID(ProjectName, LogIn.user_ID);
                cg = new CategorySer();
                tk = cs.GetAll(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).ToLongTimeString();
                    ad.Task_ID = tk[i].Task_ID;
                    flowLayoutPanel1Today.Controls.Add(ad);
                }
            }
        }