private void btn_inlog_Click(object sender, EventArgs e) { Login_Service login = new Login_Service(); //Login_DAO login = new Login_DAO(); Inlog inlog = new Inlog(); string password = txt_Password.Text; inlog = login.GetEmployeeWithPassword(int.Parse(password)); if (inlog.functie == "manager" && inlog.wachtwoord == txt_Password.Text) { this.Hide(); ManagementActionForm managementOverview = new ManagementActionForm(inlog); managementOverview.Show(); } else if (inlog.functie == "barman" || inlog.functie == "kok" && inlog.wachtwoord == txt_Password.Text) { this.Hide(); KitchenActionForm kitchenAndBar = new KitchenActionForm(inlog); kitchenAndBar.Show(); } else if (inlog.functie == "bediening" && inlog.wachtwoord == txt_Password.Text) { this.Hide(); TableForm table = new TableForm(inlog); table.Show(); } else { lbl_IncorrectPassword.ForeColor = Color.Red; lbl_IncorrectPassword.Text = "Incorrect wachtwoord, probeer opnieuw"; txt_Password.Clear(); } }
public OrderDoActionForm(BestellingOrderItem orderItem, KitchenActionForm mainWindowUI, bool isDone) { InitializeComponent(); // Initialize MaterialSkinManager materialSkinManager = MaterialSkinManager.Instance; materialSkinManager.AddFormToManage(this); materialSkinManager.Theme = MaterialSkinManager.Themes.DARK; materialSkinManager.ColorScheme = new ColorScheme(Primary.BlueGrey800, Primary.BlueGrey900, Primary.BlueGrey500, Accent.LightBlue200, TextShade.WHITE); this.orderItem = orderItem; mainWindow = mainWindowUI; this.isDone = isDone; }