Exemplo n.º 1
0
 public DoctorPresenter(IDoctorView doctorView)
 {
     this.doctorView         = doctorView;
     doctorModel             = new DoctorModel();
     doctorView.SearchClick += LoadSearchResultGrid;
     doctorView.ClearClick  += LoadAllDoctorGrids;
     doctorView.LoadForm    += LoadAllDoctorGrids;
 }
Exemplo n.º 2
0
 public DoctorPresenter(IDoctorView doctorView)
 {
     this.doctorView = doctorView;
     doctorModel = new DoctorModel();
     doctorView.SearchClick += LoadSearchResultGrid;
     doctorView.ClearClick += LoadAllDoctorGrids;
     doctorView.LoadForm += LoadAllDoctorGrids;
 }
Exemplo n.º 3
0
        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;
        }