private void button1_Click(object sender, EventArgs e)
 {
     this.Hide();
     DoctorHomeForm doctorHome = new DoctorHomeForm(user);
     doctorHome.ShowDialog();
     this.Close();
 }
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int id = int.Parse(this.dataGridView1.CurrentRow.Cells["Id"].Value.ToString());
            ShowExaminationRequestDetailsForm showExaminationRequestDetailsForm = new ShowExaminationRequestDetailsForm(id);
            showExaminationRequestDetailsForm.ShowDialog();
            this.Hide();
            DoctorHomeForm doctorHome = new DoctorHomeForm(user);
            doctorHome.ShowDialog();
            this.Close();

        }
        private Form GetFormByRole(UserModel userModel)
        {
            Form form = null;

            if (userModel.Role.Equals(UserRoleNameProvider.Doctor))
            {
                form = new DoctorHomeForm(userModel);
            }
            else if (userModel.Role.Equals(UserRoleNameProvider.Admin))
            {
                form = new AdminHomeForm();
            }
            return(form);
        }