public void LoadAppointments() { ep.SetError(dgAppointment, ""); try { if (rbAllActiveAppointment.Checked) { _appointmentSearchClassBase = new ActiveAppointmentsClass(this); //_appointmentSearchClassBase.SetDataSource(); } else if (rbAppointmentsPendingClosure.Checked) { _appointmentSearchClassBase = new AppointmentsWaitingClosureClass(this); //_appointmentSearchClassBase.SetDataSource(); } else if (rbPastAppointments.Checked) { _appointmentSearchClassBase = new PastAppointmentClass(this); //_appointmentSearchClassBase.SetDataSource(); } _appointmentSearchClassBase.SetDataSource(); } catch (Exception ex) { ep.SetError(dgAppointment, ex.Message); } }
public void dtpTo_ValueChanged(object sender, EventArgs e) { _appointmentSearchClassBase = new PastAppointmentClass(this); _appointmentSearchClassBase.SetDataSource(); }