public DoctorPresenter(IDoctorView doctorView) { this.doctorView = doctorView; doctorModel = new DoctorModel(); doctorView.SearchClick += LoadSearchResultGrid; doctorView.ClearClick += LoadAllDoctorGrids; doctorView.LoadForm += LoadAllDoctorGrids; }
public OrderOfPatientPresenter(IOrderSearchForm orderSearchView, IOrderOfPatientModel orderModel, IPatientModel patientModel, IDoctorModel doctorModel, IOrderStatusModel orderStatusModel) { this.orderSearchView = orderSearchView; this.orderModel = orderModel; this.patientModel = patientModel; this.doctorModel = doctorModel; this.orderStatusModel = orderStatusModel; this.patientModel.GetAllPatients(); this.doctorModel.GetDoctors(); this.orderStatusModel.GetOrderStatuses(); this.orderSearchView.DataSourcePatient = this.patientModel.ListPatientsForOrder; this.orderSearchView.DataSourceDoctor = this.doctorModel.ListDoctors; this.orderSearchView.DataSourceOrderStatus = this.orderStatusModel.ListOrderStatuses; this.orderSearchView.LoadDataDataEvent += GetAllOrdersFromModelEventHandler; this.orderSearchView.OrderDetailData.AddOrUpdateOrderEvent += AddOrUpdateOrderEventHandler; this.orderSearchView.EditOrderEvent += EditOrderEventHandler; this.orderSearchView.DeleteOrderEvent += DeleteOrderEventHandler; this.orderSearchView.SaveDataToModelEvent += SaveDataToModelEventHandler; }