private void signinButton_Click(object sender, EventArgs e) { try { if (verifier("frontend".Trim(), usernameTextBox.Text.Trim(), passwordTextBox.Text.Trim())) { this.Hide(); Frontend hotel_management = new Frontend(); hotel_management.Show(); } else if (verifier("kitchen".Trim(), usernameTextBox.Text.Trim(), passwordTextBox.Text.Trim())) { this.Hide(); Kitchen kitchen_management = new Kitchen(); kitchen_management.Show(); } else { MetroFramework.MetroMessageBox.Show(this, "Username or Password is wrong, try again", "Login Failed", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); } } catch (Exception ex) { MetroFramework.MetroMessageBox.Show(this, ex.ToString(), "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); } }
private void button1_Click(object sender, EventArgs e) { this.Hide(); Kitchen kitchen_management = new Kitchen(); kitchen_management.Show(); }
public override void log() { Login ln = new Login(); ln.Hide(); Kitchen kitchen_management = new Kitchen(); kitchen_management.Show(); }
private void signinButton_Click(object sender, EventArgs e) { try { if (verifier("frontend".Trim(), usernameTextBox.Text.Trim(), passwordTextBox.Text.Trim())) { this.Hide(); Frontend hotel_management = new Frontend(); hotel_management.Show(); } else if (verifier("kitchen".Trim(), usernameTextBox.Text.Trim(), passwordTextBox.Text.Trim())) { this.Hide(); Kitchen kitchen_management = new Kitchen(); kitchen_management.Show(); } else { MetroFramework.MetroMessageBox.Show(this, "Username or Password is wrong, try again", "Login Failed", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); } } catch (Exception ex) { MetroFramework.MetroMessageBox.Show(this, ex.ToString(), "Error", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error); } }