private void AppointmentSystem_Load(object sender, EventArgs e) { var patientFullName = patientManagement.GetPatient(UserID); lblPatientName.Text = patientFullName.FirstName + " " + patientFullName.LastName; cmbHospital.SelectedIndexChanged -= new EventHandler(cmbHospital_SelectedIndexChanged); cmbHospital.DataSource = hospitalManagement.ListHospital(); cmbHospital.DisplayMember = "HospitalName"; cmbHospital.ValueMember = "HospitalId"; cmbHospital.SelectedIndex = -1; cmbHospital.SelectedIndexChanged += new EventHandler(cmbHospital_SelectedIndexChanged); cmbPolyclinic.SelectedIndexChanged -= new EventHandler(cmbPolyclinic_SelectedIndexChanged); var polyclinics = polyclinicManagement.ListPolyclinic(); cmbPolyclinic.DataSource = polyclinics.ToList(); cmbPolyclinic.DisplayMember = "PolyclinicName"; cmbPolyclinic.ValueMember = "PolyclinicId"; cmbPolyclinic.SelectedIndex = -1; cmbPolyclinic.SelectedIndexChanged += new EventHandler(cmbPolyclinic_SelectedIndexChanged); cmbClinicLocation.SelectedIndexChanged -= new EventHandler(cmbClinicLocation_SelectedIndexChanged); var departments = departmentManagement.ListDepartment(); cmbClinicLocation.DataSource = departments.ToList(); cmbClinicLocation.DisplayMember = "DepartmentName"; cmbClinicLocation.ValueMember = "DepartmentId"; cmbClinicLocation.SelectedIndex = -1; cmbClinicLocation.SelectedIndexChanged += new EventHandler(cmbClinicLocation_SelectedIndexChanged); cmbChooseDoctor.SelectedIndexChanged -= new EventHandler(cmbChooseDoctor_SelectedIndexChanged); var doctors = doctorManagement.ListDoctor(); cmbChooseDoctor.DataSource = doctors.ToList(); cmbChooseDoctor.DisplayMember = "FirstName+' '+LastName"; cmbChooseDoctor.ValueMember = "DoctorId"; cmbChooseDoctor.SelectedIndex = -1; cmbChooseDoctor.SelectedIndexChanged += new EventHandler(cmbChooseDoctor_SelectedIndexChanged); }
public Patient GetPatient(Member member) { return(patientManagement.GetPatient(member)); }