private void Examination_Load(object sender, EventArgs e) { btnAddPrescription.Enabled = false; dtpAppointmentDate.MinDate = DateTime.Today; grpAddAppointment.Visible = false; doctorID = Homepage.userID; examinationController = new ExaminationController(); var doctorList = examinationController.Examination(doctorID); cmbDiagnosis.DataSource = doctorList; cmbDiagnosis.DisplayMember = "DiagnosisName"; cmbDiagnosis.ValueMember = "DiagnosisId"; cmbDiagnosis.Text = string.Empty; cmbDiagnosis.SelectedIndex = -1; hospitalController = new HospitalController(); hospitals = hospitalController.GetAll(); cmbHospital.DataSource = hospitals; cmbHospital.DisplayMember = "HospitalName"; cmbHospital.ValueMember = "HospitalId"; cmbHospital.Text = string.Empty; cmbDoctor.SelectedIndex = -1; cmbPolyclinic.Items.Clear(); }
private void MakeAppointment_Load(object sender, EventArgs e) { dtpAppointmentDate.MinDate = DateTime.Today; hospitalController = new HospitalController(); hospitals = hospitalController.GetAll(); cmbHospital.DataSource = hospitals; cmbHospital.DisplayMember = "HospitalName"; cmbHospital.ValueMember = "HospitalId"; cmbHospital.Text = string.Empty; cmbDoctor.SelectedIndex = -1; cmbPolyclinic.Items.Clear(); AllDepartments(); }