Ejemplo n.º 1
0
        private void btnMenu_Click(object sender, EventArgs e)
        {
            mainMenu main = new mainMenu(); //showing the main menu

            this.Hide();
            main.ShowDialog();
        }
Ejemplo n.º 2
0
        private void btnMenu_Click(object sender, EventArgs e)
        {
            mainMenu main = new mainMenu();//doing a new form

            this.Hide();
            main.ShowDialog();
        }
Ejemplo n.º 3
0
 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
     }
 }