//private void rbStudents_CheckedChanged_1(object sender, EventArgs e)
        //{
        //    LoadFullList();
        //}

        //private void rdStaff_CheckedChanged_1(object sender, EventArgs e)
        //{
        //    LoadFullList();
        //}

        private void dataGridView1_RowHeaderMouseDoubleClick_1(object sender, DataGridViewCellMouseEventArgs e)
        {
            int    index    = e.RowIndex;
            int    personId = (int)dgDoctor.Rows[e.RowIndex].Cells[0].Value;
            Person person   = _allDoctors.Find(x => x.PersonId == personId);

            if (person != null)
            {
                //if (Application.OpenForms["EditDoctor"] as StudentEdit != null)
                //{
                //    EditDoctor frm1 = (EditDoctor)Application.OpenForms["EditDoctor"];
                //    frm1.Close();
                //}
                DoctorAddEdit frm = new DoctorAddEdit((Doctor)person, "Edit");
                //frm.MdiParent = _mdiForm;
                //frm.Dock = DockStyle.Fill;
                //frm.FormBorderStyle = FormBorderStyle.None;
                frm.ShowDialog();
                //if (frm.DialogResult == DialogResult.OK)
                //{
                LoadFullList();
                SetDataSource();
                //}
            }
        }
        private void addDoctorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DoctorAddEdit dae = new DoctorAddEdit(new Doctor(), "Add");

            dae.ShowDialog();
            if (dae.DialogResult == DialogResult.OK)
            {
                _student.Doctors.Add(dae.Doctor);
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
        private void addNewDoctorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            DoctorAddEdit sa = new DoctorAddEdit(new Doctor(), "add");

            sa.ShowDialog();
            if (sa.DialogResult == DialogResult.OK)
            {
                //if (Application.OpenForms["DoctorSearch"] as DoctorSearch != null)
                //{
                //DoctorSearch frm1 = (DoctorSearch)Application.OpenForms["DoctorSearch"];
                LoadFullList();
                SetDataSource();
                // }
            }
        }
        //private void AddEditAppointment_Shown(object sender, EventArgs e)
        //{
        //    cmbAppointmentType.SelectedIndexChanged += cmbAppointmentType_SelectedIndexChanged;
        //    cmbStaffAccompanyingId.SelectedIndexChanged += cmbStaffAccompanyingId_SelectedIndexChanged;
        //    cmbResidentId.SelectedIndexChanged += cmbResidentId_SelectedIndexChanged;
        //    cmbSpecialistId.SelectedIndexChanged += cmbSpecialistId_SelectedIndexChanged;
        //}

        private void cmbAddSpecialist_Click(object sender, EventArgs e)
        {
            if (_appointmentClassBase is DoctorAppointmentClass)
            {
                DoctorAddEdit dr = new DoctorAddEdit(new Doctor(), "Add");
                dr.ShowDialog();
                if (dr.DialogResult == DialogResult.OK)
                {
                    PopulateDoctors();
                }
            }
            else
            {
                ProfessionalAddEdit pr = new ProfessionalAddEdit(new Specialist(), "Add");
                pr.DefaultSelectedValue = (int)cmbAppointmentType.SelectedValue;
                pr.ShowDialog();
                if (pr.DialogResult == DialogResult.OK)
                {
                    PopulateSpecialists();
                }
            }
        }
示例#5
0
 public AddNewDoctor(DoctorAddEdit doctorAddEdit) : base(doctorAddEdit)
 {
     _doctorAddEdit.Text = "Add Doctor";
     //_doctorAddEdit.btnCommit.Text = "Add Doctor";
 }
 public EditDoctor(DoctorAddEdit doctorAddEdit) : base(doctorAddEdit)
 {
     _doctorAddEdit.Text = "Update Doctor";
 }
示例#7
0
 public AddEditDoctorBase(DoctorAddEdit doctorAddEdit)
 {
     _doctorAddEdit = doctorAddEdit;
     AddBindingToDoctor();
 }