private void dataGridView1_RowHeaderMouseDoubleClick_1(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (!_mdiForm.Jarvis.CurrentUser.UserHasPermissionForAction("Appointment", "Edit"))
            {
                return;
            }

            int             index = e.RowIndex;
            int             apId  = (int)dgAppointment.Rows[e.RowIndex].Cells[0].Value;
            AppointmentBase ap    = _appointmentSearchClassBase.GetAppointment(apId);

            if (ap != null)
            {
                //if (Application.OpenForms["StudentAddEdit"] as StudentAddEdit != null)
                //{
                //    StudentAddEdit frm1 = (StudentAddEdit)Application.OpenForms["StudentAddEdit"];
                //    frm1.Close();
                //}
                AddEditAppointment frm = new AddEditAppointment(ap);
                //frm.MdiParent = _mdiForm;
                //frm.Dock = DockStyle.Fill;
                //frm.FormBorderStyle = FormBorderStyle.None;
                frm.ShowDialog();
                LoadAppointments();
            }
        }
        private void addNewStudentToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!_mdiForm.Jarvis.CurrentUser.UserHasPermissionForAction("Appointment", "Add"))
            {
                return;
            }
            AddEditAppointment frm = new AddEditAppointment(new NewAppointment());

            frm.ShowDialog();
            if (frm.DialogResult == DialogResult.OK)
            {
                LoadAppointments();
                //SetDataSource();
            }
        }