Beispiel #1
0
        private void dataGridView1_RowHeaderMouseDoubleClick_1(object sender, DataGridViewCellMouseEventArgs e)
        {
            int        index    = e.RowIndex;
            int        personId = (int)dgProfessionalServices.Rows[e.RowIndex].Cells[0].Value;
            Specialist person   = _allProfessionals.Find(x => x.PersonId == personId);

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

            dae.ShowDialog();
            if (dae.DialogResult == DialogResult.OK)
            {
                _student.ProfessionalServiceProviders.Add(dae.Specialist);
                this.DialogResult = DialogResult.OK;
                this.Close();
            }
        }
Beispiel #3
0
        private void addNewDoctorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ProfessionalAddEdit sa = new ProfessionalAddEdit(new Specialist(), "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();
                }
            }
        }
Beispiel #5
0
 public AddEditProfessionalBase(ProfessionalAddEdit professionalAddEdit)
 {
     _professionalAddEdit = professionalAddEdit;
     //PopulateProfessionTypeComboBox();
     AddBindingToDoctor();
 }
Beispiel #6
0
 public AddNewProfessional(ProfessionalAddEdit addEdit) : base(addEdit)
 {
     _professionalAddEdit.Text = "Add Specialist";
     //_doctorAddEdit.btnCommit.Text = "Add Doctor";
 }
Beispiel #7
0
 public EditProfessional(ProfessionalAddEdit doctorAddEdit) : base(doctorAddEdit)
 {
     _professionalAddEdit.Text = "Update Specialist";
 }