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 view, IDoctorRepository models)
        {
            _view = view;
            view.GridDataSource = this;
            _models             = models;

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