public MedicalCardFormPresenter(IMedicalCardView iMedicalCardView, IMedicalCardModel medicalCardModel, IMedicalCardManager medicalCardManager)
        {
            if (iMedicalCardView is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(iMedicalCardView)));
            }

            if (medicalCardModel is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(medicalCardModel)));
            }

            if (medicalCardManager is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(medicalCardManager)));
            }

            this.medicalCardModel   = medicalCardModel;
            this.iMedicalCardView   = iMedicalCardView;
            this.medicalCardManager = medicalCardManager;
            iMedicalCardView.ReferenceBook_Click += IMedicalCardView_ReferenceBook_Click;
            iMedicalCardView.MedicalCardFormLoad += IMedicalCardView_MedicalCardFormLoad;
            iMedicalCardView.ReadMedicalCard     += IMedicalCardView_ReadMedicalCard;
            iMedicalCardView.DoctorSelect        += IMedicalCardView_DoctorSelect;
            iMedicalCardView.WriteToMedicalCard  += IMedicalCardView_WriteToMedicalCard;
            iMedicalCardView.SaveChanges         += IMedicalCardView_SaveChanges;
            iMedicalCardView.Report += IMedicalCardView_Report;
        }
Пример #2
0
        public ShowMedicalCardPresenter(IShowMedicalCard iShowMedicalCard, IMedicalCardManager medicalCardManager)
        {
            if (iShowMedicalCard is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(iShowMedicalCard)));
            }

            this.iShowMedicalCard   = iShowMedicalCard;
            this.medicalCardManager = medicalCardManager;

            iShowMedicalCard.MedicalCardOpen += IShowMedicalCard_MedicalCardOpen;
        }
Пример #3
0
        public RegistrationPresenter(IRegistrationView iRegistrationView, IRegistrationModel iRegistrationModel, IMedicalCardManager iMedicalCardManager)
        {
            if (iRegistrationView is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(iRegistrationView)));
            }

            if (iRegistrationModel is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(iRegistrationModel)));
            }

            if (iMedicalCardManager is null)
            {
                throw new ArgumentNullException(String.Format("{0} is null", nameof(iMedicalCardManager)));
            }

            this.iRegistrationView   = iRegistrationView;
            this.iRegistrationModel  = iRegistrationModel;
            this.iMedicalCardManager = iMedicalCardManager;

            iRegistrationView.RegistrationFormLoad += IRegistrationView_RegistrationFormLoad;
            iRegistrationView.SaveChanges          += IRegistrationView_SaveChanges;
        }
 public MedicalController(IMedicalCardManager medicalCardManager)
 {
     _medicalCardManager = medicalCardManager;
 }