private void btnLogin_Click(object sender, EventArgs e) { string choice = cbxType.Text; switch (choice) { case "Admin": if (DLL.AdminLogin(txtUsername.Text, txtPassword.Text) == true) { frmAdmin admin = new frmAdmin(); admin.ShowDialog(); } break; case "User": if (DLL.UserLogin(txtUsername.Text, txtPassword.Text) == true) { frmStudent student = new frmStudent(); student.ShowDialog(); } break; } }