//When Return to Menu is clicked, return to the main menu private void button1_Click_1(object sender, EventArgs e) { this.Hide(); Menu cp = new Menu(Emp); cp.ShowDialog(); this.Close(); }
//When confirm is clicked, the value of combobox2 will be the OrderID //Call the AssignStaffToOrder function, then return to menu private void button4_Click_1(object sender, EventArgs e) { OrderId = (int)comboBox2.SelectedValue; Employee.AssignStaffToOrder(EmployeeToAssign.EmployeeName, OrderId); MessageBox.Show("Order Assigned"); this.Hide(); Menu cp = new Menu(Emp); cp.ShowDialog(); this.Close(); }