public DoctorPresenter(IDoctorView doctorView) { this.doctorView = doctorView; doctorModel = new DoctorModel(); doctorView.SearchClick += LoadSearchResultGrid; doctorView.ClearClick += LoadAllDoctorGrids; doctorView.LoadForm += LoadAllDoctorGrids; }
public DoctorPresenter(IDoctorView view, IDoctorRepository models) { _view = view; view.GridDataSource = this; _models = models; GetAllDoctors(); }
private void Doctor_Form_Button_Click(object sender, EventArgs e) { DoctorForm doctorForm = new DoctorForm(this); IDoctorViewRef = doctorForm; doctorForm.Owner = this; doctorForm.Show(); Visible = false; Doctor_Click?.Invoke(this, EventArgs.Empty); }
public void EntityChoice(Entities entity) { switch (entity) { case Entities.Administrator: { label1.Show(); Doctor.Show(); Registrator.Show(); button3.Show(); label2.Hide(); enter.Hide(); textBox1.Hide(); break; } case Entities.Registrator: { textBox1.Clear(); RegistratorForm RegistratorFormRef = new RegistratorForm(this); IRegistratorViewRef = RegistratorFormRef; RegistratorFormRef.Owner = this; RegistratorFormRef.Show(); Visible = false; Registrator_Click?.Invoke(this, EventArgs.Empty); break; } case Entities.Doctor: { textBox1.Clear(); DoctorForm doctorForm = new DoctorForm(this); IDoctorViewRef = doctorForm; doctorForm.Owner = this; doctorForm.Show(); Visible = false; Doctor_Click?.Invoke(this, EventArgs.Empty); break; } case Entities.Empty: { MessageService.ShowWarning("Wrong login was entered"); textBox1.Clear(); break; } } MelodyThread.Suspend(); }
public DoctorFormPresenter(IDoctorView doctorView) { if (doctorView is null) { throw new ArgumentNullException(String.Format("{0} is null", nameof(doctorView))); } this.doctorView = doctorView; doctorView.OpenPatientsCard_Click += DoctorView_OpenPatientsCard_Click; doctorView.RecordedPatients_Click += DoctorView_RecordedPatients_Click; doctorView.ReferenceBook_Click += DoctorView_ReferenceBook_Click; doctorView.Statistics_Click += DoctorView_Statistics_Click; }
public DoctorPresenter(IDoctorView param) { view = param; }