예제 #1
0
        public EmployeeForm(EmployeeClass empnow)
        {
            InitializeComponent();
            flowLayoutPanel1.Controls.Clear();

            OnHome.Visible     = true;
            OnViewProj.Visible = false;
            //ViewTasksUC view = new ViewTasksUC();

            EmployeeClass    tasklist = new EmployeeClass();
            List <TaskClass> list     = new List <TaskClass>();

            tasklist.displaytasks(ref list, empnow.id);
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].status != "Finish")
                {
                    ViewTasksUC view = new ViewTasksUC(list[i], empnow);
                    view.taskStatus.Visible = true;
                    view.ProjectName.Text   = list[i].project_name;
                    view.TaskName.Text      = list[i].name;
                    view.TaskEmpLabel.Text  = list[i].employee_name;
                    view.startDuration.Text = "start on " + list[i].start_time.ToString();
                    view.endDuration.Text   = "end on " + list[i].end_time.ToString();
                    view.taskStatus.Text    = list[i].status;
                    flowLayoutPanel1.Controls.Add(view);
                }
            }
        }
예제 #2
0
        private void ViewTasksBtn_MouseClick(object sender, MouseEventArgs e)
        {
            ViewTasksUC.taskDescription.Hide();
            ViewTasksUC.cmtOrass.commentTextBox.Clear();
            ViewTasksUC.cmtOrass.Hide();
            flowLayoutPanel1.Controls.Clear();
            flowLayoutPanel1.BringToFront();
            OnHome.Visible     = false;
            OnViewProj.Visible = true;

            //ViewTasksUC view = new ViewTasksUC();

            EmployeeClass    tasklist = new EmployeeClass();
            List <TaskClass> list     = new List <TaskClass>();

            tasklist.displaytasks(ref list, empnow.id);
            for (int i = 0; i < list.Count; i++)
            {
                if (list[i].status == "Finish")
                {
                    ViewTasksUC view = new ViewTasksUC(list[i]);
                    view.TaskFinishedBtn.Visible = false;
                    view.AssignLabelBtn.Visible  = false;
                    view.CommentLabelBtn.Visible = false;
                    view.taskStatus.Visible      = true;
                    view.ProjectName.Text        = list[i].project_name;
                    view.TaskName.Text           = list[i].name;
                    view.TaskEmpLabel.Text       = list[i].employee_name;
                    view.startDuration.Text      = "start on " + list[i].start_time.ToString();
                    view.endDuration.Text        = "end on " + list[i].end_time.ToString();
                    view.taskStatus.Text         = list[i].status;
                    flowLayoutPanel1.Controls.Add(view);
                }
            }
        }
예제 #3
0
        private void MoreLabelBtn_MouseClick(object sender, MouseEventArgs e)
        {
            projInfo.Hide();
            editProj.Hide();
            tasksPanel.Size       = new Size(850, 400);
            tasksPanel.AutoScroll = true;
            tasksPanel.Location   = new Point(350, 200);
            tasksPanel.BackColor  = Color.Silver;
            ParentForm.Controls.Add(tasksPanel);
            tasksPanel.Controls.Clear();
            tasksPanel.Show();
            tasksPanel.BringToFront();
            //here
            AdminClass       adm      = new AdminClass();
            List <TaskClass> tasklist = new List <TaskClass>();

            adm.showtask(ref tasklist, project.id);
            for (int i = 0; i < tasklist.Count; i++)
            {
                ViewTasksUC task = new ViewTasksUC();
                task.taskStatus.Visible      = true;
                task.InfoLabelBtn.Visible    = false;
                task.AssignLabelBtn.Visible  = false;
                task.CommentLabelBtn.Visible = false;
                task.TaskFinishedBtn.Visible = false;
                //here
                task.TaskName.Text      = tasklist[i].name;
                task.ProjectName.Text   = tasklist[i].project_name;
                task.TaskEmpLabel.Text  = tasklist[i].employee_name;
                task.startDuration.Text = "Start on " + tasklist[i].start_time.Day + " / " + tasklist[i].start_time.Month + " / " + tasklist[i].start_time.Year;
                task.endDuration.Text   = "End on " + tasklist[i].end_time.Day + " / " + tasklist[i].end_time.Month + " / " + tasklist[i].end_time.Year;
                task.taskStatus.Text    = tasklist[i].status;
                tasksPanel.Controls.Add(task);
            }
        }