Beispiel #1
0
 public DoctorPresenter(IDoctorView doctorView)
 {
     this.doctorView         = doctorView;
     doctorModel             = new DoctorModel();
     doctorView.SearchClick += LoadSearchResultGrid;
     doctorView.ClearClick  += LoadAllDoctorGrids;
     doctorView.LoadForm    += LoadAllDoctorGrids;
 }
Beispiel #2
0
        public DoctorPresenter(IDoctorView view, IDoctorRepository models)
        {
            _view = view;
            view.GridDataSource = this;
            _models             = models;

            GetAllDoctors();
        }
Beispiel #3
0
 public DoctorPresenter(IDoctorView doctorView)
 {
     this.doctorView = doctorView;
     doctorModel = new DoctorModel();
     doctorView.SearchClick += LoadSearchResultGrid;
     doctorView.ClearClick += LoadAllDoctorGrids;
     doctorView.LoadForm += LoadAllDoctorGrids;
 }
Beispiel #4
0
        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);
        }
Beispiel #5
0
        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;
 }