private void clubMaintenance_FormClosing(object sender, FormClosingEventArgs e) { adminDashboard ad = new adminDashboard(); ad.Show(); this.Dispose(); }
private void studentRegister_FormClosing(object sender, FormClosingEventArgs e) { adminDashboard ad = new adminDashboard(); ad.Show(); this.Dispose(); }
private void viewClubDetails_FormClosing(object sender, FormClosingEventArgs e) { if (this.role == "student") { stdDashboard sd = new stdDashboard(this.usrid); sd.Show(); } else { adminDashboard ad = new adminDashboard(); ad.Show(); } this.Dispose(); }
private void btnLogin_Click(object sender, EventArgs e) { if (txtUserID.Text.Length == 0 || txtPassword.Text.Length == 0) { MessageBox.Show("Empty entries is not allowed!"); return; } int id = 0; if (!int.TryParse(txtUserID.Text, out id)) { MessageBox.Show("Please re-enter your user id!"); return; } if (cboUserRole.SelectedItem.ToString() == "Admin") { if (admin.auth(id, txtPassword.Text)) { adminDashboard ad = new adminDashboard(); ad.Show(); this.Hide(); } else { MessageBox.Show("Invalid credentials!"); } } else { if (student.auth(id, txtPassword.Text)) { stdDashboard sd = new stdDashboard(id); sd.Show(); this.Hide(); } else { MessageBox.Show("Invalid credentials!"); } } }