private void FinishTaskBtn_MouseClick(object sender, MouseEventArgs e) { TaskClass task = new TaskClass(); task.name = TaskNameTextbox.Text; task.start_time = Convert.ToDateTime(startTime.Text); task.end_time = Convert.ToDateTime(EndTime.Text); task.description = ProjDescription.Text; for (int i = 0; i < prolist.Count; i++) { if (prolist[i].name == projectnamecompo.Text) { task.id_project = prolist[i].id; break; } } for (int i = 0; i < emplist.Count; i++) { if (emplist[i].name == empNameBox.Text) { task.id_employee = emplist[i].id; break; } } empnow.AssignTask(task); empNameBox.Text = ""; ProjDescription.Clear(); MessageBox.Show("Task Assigned Successfully"); }
private void FinishProjBtn_Click(object sender, EventArgs e) { ProjectClass pro = new ProjectClass(); pro.name = ProjNameTextbox.Text; pro.start_time = Convert.ToDateTime(startTime.Text); pro.end_time = Convert.ToDateTime(EndTime.Text); pro.clinet_name = cNameBox.Text; pro.client_mail = cMailBox.Text; pro.status = "running"; pro.client_phone = cPhoneBox.Text; for (int i = 0; i < managername.Count; i++) { if (managername[i].name == comboBox1.Text) { pro.id_manger = managername[i].id; break; } } pro.description = ProjDescription.Text; AdminClass adm = new AdminClass(); adm.addproject(pro); ProjNameTextbox.Clear(); cNameBox.Clear(); cMailBox.Clear(); cPhoneBox.Clear(); ProjDescription.Clear(); comboBox1.Text = ""; MessageBox.Show("Project Added Successfully"); }