private void DeterminePermissions(UserRole role, string userName)
 {
     // determine where the user is brought to and if user role is none then user is invalid and nothing happens
     if (role == UserRole.SuperUser)
     {
         AddLogin addLogin = new AddLogin();
         addLogin.Show();
         this.Hide();
     }
     else if (role == UserRole.HR)
     {
         DoctorsDashboard docDashboard = new DoctorsDashboard(role, userName);
         docDashboard.Show();
         this.Hide();
     }
     else if (role == UserRole.Admin)
     {
         PatientsDashboard patientDashboard = new PatientsDashboard(role, userName);
         patientDashboard.Show();
         this.Hide();
     }
     else if (role == UserRole.Accounts)
     {
         HomeDashboard homeDashboard = new HomeDashboard(role, userName);
         homeDashboard.Show();
         this.Hide();
     }
     else
     {
         MessageBox.Show(this, "User does not match with any in our system please try again", "Invalid User", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
 public SearchDoctorsSurname(DoctorsDashboard dash, string surname)
 {
     InitializeComponent();
     populateList(surname);
     homeDash = dash;
 }