private void cJobAddButton_Click(object sender, EventArgs e) { if (!String.IsNullOrEmpty(cJobNameTextBox.Text)) { Jobs j = _jobs.CreateJobs(cJobNameTextBox.Text, Convert.ToDouble(cJobSalaryNumUpDownBox.Value)); cJobIdNumLabel.Text = j.JobTitleID.ToString(); jobsListBox.Items.Add(j.JobName); cEmployJobTitleComboBox.Items.Add(j.JobName); } else { MessageBox.Show("Please make sure to fill out the job name section"); } }
public void initJobs(JobsRepo jr) { Tuple <string, double>[] jobs = { new Tuple <string, double>("Manager", 15.00), new Tuple <string, double>("Waiter", 12.00), new Tuple <string, double>("DishWasher", 9.50), new Tuple <string, double>("Cook", 13.00), new Tuple <string, double>("Host", 10.00), new Tuple <string, double>("Delivery Driver", 11.00) }; foreach (Tuple <string, double> j in jobs) { jr.CreateJobs(j.Item1, j.Item2); } }