private void button1_Click(object sender, EventArgs e) { String user = textBox1.Text; String pass = textBox2.Text; password = pass; if (user == "admin" & pass == "admin") { AdMain f2 = new AdMain(); this.Hide(); f2.Show(this); } else if (user == "Lecturer") { LecMain f2 = new LecMain(password); this.Hide(); f2.Show(this); } else if (user == "Student") { StuMain f2 = new StuMain(password); this.Hide(); f2.Show(this); } else { string message = "ERROR"; string title = "INVALID LOGIN DETAILS"; MessageBox.Show(title, message); } }
private void Back_Click(object sender, EventArgs e) { StuMain f2 = new StuMain(""); this.Hide(); f2.Show(this); }
private void button1_Click(object sender, EventArgs e) { if (Passw == "admin") { AdMain f2 = new AdMain(); this.Hide(); f2.Show(this); } if (user == "stu") { StuMain f2 = new StuMain(Passw); this.Hide(); f2.Show(this); } if (user == "lec") { LecMain f2 = new LecMain(Passw); this.Hide(); f2.Show(this); } }