private void btnMenu_Click(object sender, EventArgs e) { mainMenu main = new mainMenu(); //showing the main menu this.Hide(); main.ShowDialog(); }
private void btnMenu_Click(object sender, EventArgs e) { mainMenu main = new mainMenu();//doing a new form this.Hide(); main.ShowDialog(); }
private void btnLogin_Click(object sender, EventArgs e) { if ((txtUsername.Text == employee.User && txtPassword.Text == employee.Password)) //if username and password matches to kevin and 123 { mainMenu f1 = new mainMenu(); this.Hide(); f1.ShowDialog(); } else if (txtUsername.Text == "admin" && txtPassword.Text == "admin") //if admin logs in { Register r = new Register(); //displaying the frm register this.Hide(); r.ShowDialog(); } else { MessageBox.Show("Wrong Credentials"); //if something is wrong } }