private void back_btn_Click_1(object sender, EventArgs e) { var form = new DashboardGeneralManager(mc, Model); this.Hide(); form.Dock = DockStyle.Fill; form.Show(); }
public static void ProcessLogin(mainContainer mc, IModel Model) { //Checkscurrent user type and displays new managment board for that user switch (Model.getUserTypeForCurrentUser()) { case 1: //System Administrator break; case 2: //General Manager DashboardGeneralManager form2 = new DashboardGeneralManager(mc, Model); // All forms get passed the formContainer and a reference to the model object. //this.Text = this.Text + "-Manager"; form2.Dock = DockStyle.Fill; form2.Show(); break; case 3: //Receptionist DashboardReceptionist form3 = new DashboardReceptionist(mc, Model); form3.Dock = DockStyle.Fill; form3.Show(); break; case 4: //Kitchen Manager var restaurantKitchenManager = new DashboardKitchenManager(mc, Model); restaurantKitchenManager.Dock = DockStyle.Fill; restaurantKitchenManager.Show(); break; case 5: // Kitchen Staff break; case 6: // Bar Manager break; case 7: // Bar Staff break; case 8: // Restaurant Staff break; default: //Logo //ManagmentBoard form2 = new ManagmentBoard(this, Model); // All forms get passed the formContainer and a reference to the model object. //this.Text = this.Text + "-Manager"; //form2.Dock = DockStyle.Fill; //form2.Show(); break; } }