private void pictureBox1_Click(object sender, EventArgs e) { this.Hide(); ManagerMenu um = new ManagerMenu(); um.Show(); }
private void btnlogin_Click(object sender, EventArgs e) { if (txtpw.Text.Length != 0 && txtuname.Text.Length != 0) { String pw = txtpw.Text; String uname = txtuname.Text; DBLogin l = new DBLogin(); u_id = l.login(pw, uname); if (u_id == 1) { ManagerMenu mm = new ManagerMenu(); mm.Show(); this.Hide(); mm.setid(u_id); } else if (u_id == 2) { UserMenu um = new UserMenu(); this.Hide(); um.Show(); um.setid(u_id); } } }