private void btnAssignJob_Click(object sender, EventArgs e) { if (lstTechnicians.SelectedIndex < 0) { MessageBox.Show("Please select a technician to assign the job to"); } else { jobLogic.assignJob(selectedJob.Id, selectedEmployee.Id); MessageBox.Show(string.Format("Job assigned to {0} {1}", selectedEmployee.FirstName, selectedEmployee.LastName)); this.Close(); } }
private void btnTakeJob_Click(object sender, EventArgs e) { if (lstJobs.SelectedIndex < 0) { MessageBox.Show("No job is currently selected"); } else { jobLogic.assignJob(selectedJob.Id, loggedEmployee.Id); this.Hide(); JobScreen jobScreen = new JobScreen(new Job(id: selectedJob.Id, contractID: jobContract.Id, employeeID: loggedEmployee.Id, jobStatus: "Assigned", jobDescription: selectedJob.JobDescription, clientSatisfaction: selectedJob.ClientSatisfaction, jobCategory: selectedJob.JobCategory, jobType: selectedJob.JobType, new Pay("", 600)), loggedEmployee); jobScreen.Show(); this.Close(); } }