Esempio n. 1
0
 public OnlinePaymentController(ITempcartService tempcartService, ICustomerRepository customerRepository, IProspectCustomerService prospectCustomerService
                                , IEligibilityService eligibilityService, IChargeCardRepository chargeCardRepository, IEventSchedulerService eventSchedulerService, IConfigurationSettingRepository configurationSettingRepository
                                , ISettings settings, IValidator <PaymentInstrumentEditModel> paymentValidator, IEventSchedulingSlotService slotService, IAddressService addressService, IStateRepository stateRepository
                                , ICustomerService customerService, IPaymentController paymentController, ICorporateAccountRepository corporateAccountRepository, IEmailNotificationModelsFactory emailNotificationModelsFactory
                                , IEventRepository eventRepository, ICustomerRegistrationService customerRegistrationService, INotifier notifier, ICallQueueCustomerRepository callQueueCustomerRepository, IEventSchedulingSlotService eventSchedulingSlotService, IGiftCertificateService giftCertificateService, IUniqueItemRepository <ProspectCustomer> uniqueItemRepository, IToolTipRepository toolTipRepository
                                )
 {
     _tempcartService         = tempcartService;
     _customerRepository      = customerRepository;
     _prospectCustomerService = prospectCustomerService;
     _eligibilityService      = eligibilityService;
     _chargeCardRepository    = chargeCardRepository;
     _eventSchedulerService   = eventSchedulerService;
     _settings                       = settings;
     _paymentValidator               = paymentValidator;
     _slotService                    = slotService;
     _addressService                 = addressService;
     _stateRepository                = stateRepository;
     _customerService                = customerService;
     _paymentController              = paymentController;
     _corporateAccountRepository     = corporateAccountRepository;
     _emailNotificationModelsFactory = emailNotificationModelsFactory;
     _eventRepository                = eventRepository;
     _customerRegistrationService    = customerRegistrationService;
     _notifier                       = notifier;
     _callQueueCustomerRepository    = callQueueCustomerRepository;
     _eventSchedulingSlotService     = eventSchedulingSlotService;
     _giftCertificateService         = giftCertificateService;
     _configurationSettingRepository = configurationSettingRepository;
     _enableTexting                  = Convert.ToBoolean(configurationSettingRepository.GetConfigurationValue(ConfigurationSettingName.EnableSmsNotification));
     _prospectCustomerRepository     = uniqueItemRepository;
     _toolTipRepository              = toolTipRepository;
 }
Esempio n. 2
0
        public AppointmentSlotController(IAppointmentRepository appointmentRepository, IEventAppointmentService eventAppointmentService, ISessionContext sessionContext, IEventSchedulingSlotRepository eventSchedulingSlotRepository,
                                         IEventRepository eventRepository, IEventSchedulingSlotService eventSchedulingSlotService, IEventCustomerRepository eventCustomerRepository, IEventPodRoomRepository eventPodRoomRepository,
                                         IEventTestRepository eventTestRepository, IEventPackageRepository eventPackageRepository, IOrderRepository orderRepository)
        {
            _appointmentRepository         = appointmentRepository;
            _eventSchedulingSlotService    = eventSchedulingSlotService;
            _eventAppointmentService       = eventAppointmentService;
            _sessionContext                = sessionContext;
            _eventSchedulingSlotRepository = eventSchedulingSlotRepository;
            _eventRepository               = eventRepository;
            _eventCustomerRepository       = eventCustomerRepository;
            _eventPodRoomRepository        = eventPodRoomRepository;
            _eventTestRepository           = eventTestRepository;

            _eventPackageRepository = eventPackageRepository;
            _orderRepository        = orderRepository;

            if (sessionContext == null || sessionContext.UserSession == null)
            {
                _eventSchedulingSlotService.LoggedinUserRole       = Roles.Customer;
                _eventSchedulingSlotService.LoggedinUserParentRole = Roles.Customer;
            }
            else
            {
                _eventSchedulingSlotService.LoggedinUserRole       = (Roles)sessionContext.UserSession.CurrentOrganizationRole.RoleId;
                _eventSchedulingSlotService.LoggedinUserParentRole = (Roles)sessionContext.UserSession.CurrentOrganizationRole.ParentRoleId;
            }
        }
Esempio n. 3
0
        public OnSiteRegistrationController(IEventSchedulingSlotService eventSchedulingSlotService, IValidator <OnSiteRegistrationEditModel> onSiteRegistrationModel, ILogManager logManager, IOnSiteRegistrationService onSiteRegistrationService)
        {
            _eventSchedulingSlotService = eventSchedulingSlotService;
            _onSiteRegistrationModel    = onSiteRegistrationModel;
            _onSiteRegistrationService  = onSiteRegistrationService;

            _logger = logManager.GetLogger <OnSiteRegistrationController>();
        }
Esempio n. 4
0
 public EventCustomerService(IEventCustomerRepository eventCustomerRepository, IEventCustomerAggregateFactory eventCustomerAggregateFactory, IEventCustomerRegistrationViewDataRepository eventCustomerRegistrationViewDataRepository,
                             IAppointmentRepository appointmentRepository, IEventCustomerRegistrationViewDataFactory eventCustomerRegistrationViewDataFactory, IPaymentController paymentController, IEventSchedulingSlotService slotService)
 {
     _eventCustomerRepository                     = eventCustomerRepository;
     _appointmentRepository                       = appointmentRepository;
     _eventCustomerAggregateFactory               = eventCustomerAggregateFactory;
     _eventCustomerRegistrationViewDataFactory    = eventCustomerRegistrationViewDataFactory;
     _eventCustomerRegistrationViewDataRepository = eventCustomerRegistrationViewDataRepository;
     _paymentController = paymentController;
     _slotService       = slotService;
 }
Esempio n. 5
0
 public CorporateUploadHelper(IMediaRepository mediaRepository, IStateRepository stateRepository, ICountryRepository countryRepository,
                              IEventPackageRepository eventPackageRepository, IEventSchedulingSlotService slotService, IEventService eventService, ICsvReader csvReader, IAppointmentRepository appointmentRepository)
 {
     _mediaRepository        = mediaRepository;
     _stateRepository        = stateRepository;
     _countryRepository      = countryRepository;
     _eventPackageRepository = eventPackageRepository;
     _slotService            = slotService;
     _eventService           = eventService;
     _csvReader             = csvReader;
     _appointmentRepository = appointmentRepository;
 }
Esempio n. 6
0
 public OnlineAppointmentService(IEventPackageSelectorService eventPackageSelectorService, IEventSchedulingSlotRepository eventSchedulingSlotRepository, EventPackageRepository eventPackageRepository,
                                 IEventSchedulingSlotService eventSchedulingSlotService, ITempcartService tempcartService, IEventRepository eventRepository, IEventAppointmentOnlineListModelFactory eventAppointmentOnlineListModelFactory,
                                 IEventTestRepository eventTestRepository, IOnlineShippingService onlineShippingService)
 {
     _eventPackageSelectorService   = eventPackageSelectorService;
     _eventSchedulingSlotRepository = eventSchedulingSlotRepository;
     _eventPackageRepository        = eventPackageRepository;
     _eventSchedulingSlotService    = eventSchedulingSlotService;
     _tempcartService = tempcartService;
     _eventRepository = eventRepository;
     _eventAppointmentOnlineListModelFactory = eventAppointmentOnlineListModelFactory;
     _eventTestRepository = eventTestRepository;
 }
Esempio n. 7
0
        public CustomerRegistrationService(IMassRegistrationEditModelFactory massRegistrationEditModelFactory, ISessionContext sessionContext,
                                           ICustomerService customerService, IOrganizationRoleUserRepository orgRoleUserRepository,
                                           IEventPackageRepository eventPackageRepository, IEventCustomerRepository eventCustomerRepository, IOrderController orderController,
                                           IAddressService addressService, IShippingOptionRepository shippingOptionRepository, IShippingController shippingController, INotifier notifier,
                                           IEmailNotificationModelsFactory emailNotificationModelsFactory, IEventTestRepository eventTestRepository, ISettings settings, IStateRepository stateRepository,
                                           IEventAppointmentService eventAppointmentService, IEventPackageSelectorService eventPackageSelectorService, IEventSchedulingSlotService eventSchedulingSlotService,
                                           IEventRepository eventRepository, IPhoneNotificationModelsFactory smsNotificationModelsFactory, ICorporateAccountRepository corporateAccountRepository,
                                           IEmailTemplateRepository emailTemplateRepository, ICustomerRepository customerRepository, ICustomerNotesService customerNotesService,
                                           ILanguageRepository languageRepository, ILabRepository labRepository, IUserLoginRepository userLoginRepository, ILogManager logManager,
                                           IEventCustomerNotificationRepository eventCustomerNotificationRepository, ICorporateCustomerUploadService corporateCustomerUploadService,
                                           ICurrentMedicationRepository currentMedicationRepository, ICustomerIcdCodesRepository customerIcdCodesRepository,
                                           IEventCustomerCurrentMedicationRepository eventCustomerCurrentMedicationRepository, IEventCustomerIcdCodesRepository eventCustomerIcdCodesRepository)
        {
            _massRegistrationEditModelFactory = massRegistrationEditModelFactory;
            _sessionContext           = sessionContext;
            _customerService          = customerService;
            _orgRoleUserRepository    = orgRoleUserRepository;
            _eventPackageRepository   = eventPackageRepository;
            _eventCustomerRepository  = eventCustomerRepository;
            _orderController          = orderController;
            _addressService           = addressService;
            _shippingOptionRepository = shippingOptionRepository;
            _shippingController       = shippingController;
            _notifier = notifier;
            _emailNotificationModelsFactory = emailNotificationModelsFactory;
            _eventTestRepository            = eventTestRepository;
            _settings                     = settings;
            _stateRepository              = stateRepository;
            _eventAppointmentService      = eventAppointmentService;
            _eventPackageSelectorService  = eventPackageSelectorService;
            _eventSchedulingSlotService   = eventSchedulingSlotService;
            _eventRepository              = eventRepository;
            _smsNotificationModelsFactory = smsNotificationModelsFactory;
            _corporateAccountRepository   = corporateAccountRepository;
            _emailTemplateRepository      = emailTemplateRepository;
            _customerRepository           = customerRepository;
            _customerNotesService         = customerNotesService;

            _languageRepository  = languageRepository;
            _labRepository       = labRepository;
            _userLoginRepository = userLoginRepository;

            _eventCustomerNotificationRepository = eventCustomerNotificationRepository;

            _corporateCustomerUploadService           = corporateCustomerUploadService;
            _currentMedicationRepository              = currentMedicationRepository;
            _customerIcdCodesRepository               = customerIcdCodesRepository;
            _eventCustomerCurrentMedicationRepository = eventCustomerCurrentMedicationRepository;
            _eventCustomerIcdCodesRepository          = eventCustomerIcdCodesRepository;
            _logger = logManager.GetLogger("Customer Registration Service");
        }
Esempio n. 8
0
 public OnlinePackageService(IEventRepository eventRepository,
                             IEventPackageRepository eventPackageRepository, IEventTestRepository eventTestRepository, IShippingOptionRepository shippingOptionRepository,
                             EventSchedulingSlotRepository eventSchedulingSlotRepository, IElectronicProductRepository electronicProductRepository, IEventPackageSelectorService eventPackageSelectorService,
                             IEventSchedulingSlotService eventSchedulingSlotService, ITempcartService tempcartService, ICorporateAccountRepository corporateAccountRepository,
                             IUniqueItemRepository <Test> testRepository, IHospitalPartnerRepository hospitalPartnerRepository)
 {
     _eventRepository               = eventRepository;
     _eventPackageRepository        = eventPackageRepository;
     _eventTestRepository           = eventTestRepository;
     _shippingOptionRepository      = shippingOptionRepository;
     _eventSchedulingSlotRepository = eventSchedulingSlotRepository;
     _electronicProductRepository   = electronicProductRepository;
     _eventPackageSelectorService   = eventPackageSelectorService;
     _eventSchedulingSlotService    = eventSchedulingSlotService;
     _tempcartService               = tempcartService;
     _corporateAccountRepository    = corporateAccountRepository;
     _testRepository            = testRepository;
     _hospitalPartnerRepository = hospitalPartnerRepository;
 }
 public EventPackageSelectorService(IPackageRepository packageRepository, IEventPackageRepository eventPackageRepository, IEventTestRepository eventTestRepository, IElectronicProductRepository productRepository,
                                    IEventRepository eventRepository, IShippingOptionRepository shippingOptionRepository, IConfigurationSettingRepository configurationRepository, IUniqueItemRepository <File> fileRepository, IMediaRepository mediaRepository,
                                    ICustomerRepository customerRepository, IEventSchedulingSlotService slotService, IAccountPackageRepository accountPackageRepository, IHospitalPartnerPackageRepository hospitalPartnerPackageRepository, ICorporateAccountRepository corporateAccountRepository, IRoleRepository roleRepository)
 {
     _packageRepository        = packageRepository;
     _eventPackageRepository   = eventPackageRepository;
     _eventTestRepository      = eventTestRepository;
     _productRepository        = productRepository;
     _shippingOptionRepository = shippingOptionRepository;
     _eventRepository          = eventRepository;
     _configurationRepository  = configurationRepository;
     _mediaRepository          = mediaRepository;
     _fileRepository           = fileRepository;
     _customerRepository       = customerRepository;
     _slotService = slotService;
     _accountPackageRepository         = accountPackageRepository;
     _hospitalPartnerPackageRepository = hospitalPartnerPackageRepository;
     _corporateAccountRepository       = corporateAccountRepository;
     _roleRepository = roleRepository;
 }
        public OnSiteRegistrationEditModelValidator(IUserRepository <User> userRepository, IEventSchedulingSlotService slotService)
        {
            _userRepository = userRepository;
            _slotService    = slotService;

            RuleFor(x => x.FirstName)
            .NotNull().WithMessage("required")
            .NotEmpty().WithMessage("required")
            .Length(2, 50).WithMessage("between 2-50 charaters")
            .Matches("^[a-zA-Z0-9_]*$").WithMessage("alhpa numeric only");

            RuleFor(x => x.LastName)
            .NotNull().WithMessage("required")
            .NotEmpty().WithMessage("required")
            .Length(2, 50).WithMessage("between 2-50 charaters")
            .Matches("^[a-zA-Z0-9_]*$").WithMessage("alhpa numeric only");

            RuleFor(x => x.FirstName).Must((x, firstName) => firstName != x.LastName).When(x => x.LastName != null)
            .WithMessage("First Name and Last Name Cannot be the same");

            RuleFor(x => x.HomeNumber).NotNull().NotEmpty().WithMessage("required").SetValidator(new PhoneNumberRequiredValidator());

            RuleFor(x => x.Gender).GreaterThan(0).WithMessage("Gender is required");

            //RuleFor(x => x.Email).NotNull().WithMessage("required").EmailAddress();
            //RuleFor(x => x.Email).Must((x, email) => EmailIsUnique(email)).WithMessage("Email Already in use");
            RuleFor(x => x.Email).EmailAddress().When(x => !string.IsNullOrEmpty(x.Email));

            RuleFor(x => x.Email).Must((x, email) => EmailIsUnique(email)).When(x => !string.IsNullOrEmpty(x.Email)).
            WithMessage("'Email Already in use");

            RuleFor(x => x.Address).SetValidator(new AddressEditModelValidator());

            RuleFor(m => m.SelectedPackageId).GreaterThan(0).WithMessage("Please select a Package/Test.").When(m => m.SelectedTestIds == null || m.SelectedTestIds.Count() < 1);
            RuleFor(m => m.SelectedTestIds).NotNull().WithMessage("Please select a Package/Test.").NotEmpty().WithMessage("Please select a Package/Test.").When(m => m.SelectedPackageId == 0);

            RuleFor(x => x.SelectedAppointmentId).GreaterThan(0).WithMessage("required");
            RuleFor(x => x.SelectedAppointmentId).Must((x, appointmentId) => AppointmentValidation(appointmentId))
            .When(x => x.SelectedAppointmentId > 0).WithMessage("'Appointment' already booked");
        }
Esempio n. 11
0
 public EventSchedulerService(IEventRepository eventRepository, IAppointmentRepository appointmentRepository, IEventTestRepository eventTestRepository, IEventPackageRepository eventPackageRepository, IEventCustomerSummaryModelFactory eventCustomerSummaryModelFactory,
                              IHostRepository hostRepository, ITempCartRepository tempCartRepository, IOnlineSchedulingDataFactory onlineSchedulingDataFactory, IValidator <SourceCodeApplyEditModel> sourceCodeValidator, ISourceCodeRepository sourceCodeRepository,
                              ICustomerRepository customerRepository, IElectronicProductRepository electronicProductRepository, IShippingOptionRepository shippingOptionRepository, IPaymentController paymentController, IEventCustomerRepository eventCustomerRepository,
                              IShippingController shippingController, IOrderController orderController, IAddressRepository addressRepository, IHospitalPartnerRepository hospitalPartnerRepository, IShippingDetailOrderDetailRepository shipingDetailOrderDetailRepository,
                              IOrganizationRepository organizationRepository, IOrderRepository orderRepository, IRefundRequestRepository refundRequestRepository, IToolTipRepository toolTipRepository, IConfigurationSettingRepository configurationSettingRepository,
                              IEventSchedulingSlotService slotService, IEventSchedulingSlotRepository slotRepository, IEventAppointmentService eventAppointmentService, IEligibilityRepository eligibilityRepository, IChargeCardRepository chargeCardRepository, ICorporateAccountRepository corporateAccountRepository)
 {
     _customerRepository                 = customerRepository;
     _eventRepository                    = eventRepository;
     _appointmentRepository              = appointmentRepository;
     _eventPackageRepository             = eventPackageRepository;
     _eventTestRepository                = eventTestRepository;
     _tempCartRepository                 = tempCartRepository;
     _hostRepository                     = hostRepository;
     _onlineSchedulingDataFactory        = onlineSchedulingDataFactory;
     _sourceCodeValidator                = sourceCodeValidator;
     _sourceCodeRepository               = sourceCodeRepository;
     _eventCustomerSummaryModelFactory   = eventCustomerSummaryModelFactory;
     _productRepository                  = electronicProductRepository;
     _shippingOptionRepository           = shippingOptionRepository;
     _paymentController                  = paymentController;
     _eventCustomerRepository            = eventCustomerRepository;
     _shippingController                 = shippingController;
     _orderController                    = orderController;
     _shipingDetailOrderDetailRepository = shipingDetailOrderDetailRepository;
     _orderRepository                    = orderRepository;
     _addressRepository                  = addressRepository;
     _hospitalPartnerRepository          = hospitalPartnerRepository;
     _organizationRepository             = organizationRepository;
     _refundRequestRepository            = refundRequestRepository;
     _toolTipRepository                  = toolTipRepository;
     _configurationSettingRepository     = configurationSettingRepository;
     _slotService                = slotService;
     _slotRepository             = slotRepository;
     _eventAppointmentService    = eventAppointmentService;
     _eligibilityRepository      = eligibilityRepository;
     _chargeCardRepository       = chargeCardRepository;
     _corporateAccountRepository = corporateAccountRepository;
 }
        public MassRegistrationEditModelValidator(IUserRepository <User> userRepository, IEventSchedulingSlotService slotService)
        {
            _userRepository = userRepository;
            _slotService    = slotService;

            RuleFor(x => x.FirstName)
            .NotNull().WithMessage("'First Name' required")
            .NotEmpty().WithMessage("'First Name' required")
            .Length(1, 50).WithMessage("between 1-50 charaters")
            .Matches("^[a-zA-Z0-9_]*$").WithMessage("alhpa numeric only");

            RuleFor(x => x.LastName)
            .NotNull().WithMessage("'Last Name' required")
            .NotEmpty().WithMessage("'Last Name' required")
            .Length(1, 50).WithMessage("between 1-50 charaters")
            .Matches("^[a-zA-Z0-9_]*$").WithMessage("alhpa numeric only");

            RuleFor(x => x.FirstName).Must((x, firstName) => firstName != x.LastName).When(x => x.LastName != null)
            .WithMessage("First Name and Last Name Cannot be the same");

            RuleFor(x => x.HomeNumber).SetValidator(new PhoneNumberValidator());

            RuleFor(x => x.Email).EmailAddress().When(x => !string.IsNullOrEmpty(x.Email));

            RuleFor(x => x.Email).Must((x, email) => EmailIsUnique(email)).When(x => !string.IsNullOrEmpty(x.Email)).
            WithMessage("'Email' is already in use");

            //RuleFor(x => x.Address).SetValidator(new AddressEditModelValidator());

            //RuleFor(x => x.DateOfBirth).NotNull().NotEmpty().WithMessage("'Date of Birth' is required.");
            RuleFor(x => x.DateOfBirth).Must(birthDate => birthDate < DateTime.Today).When(x => x.DateOfBirth.HasValue).WithMessage("'Date of Birth' should be less than today.");

            RuleFor(x => x.PackageId).GreaterThan(0).WithMessage("'Package' required");
            RuleFor(x => x.AppointmentId).GreaterThan(0).WithMessage("'Appointment time' required");
            RuleFor(x => x.AppointmentId).Must((x, appointmentId) => AppointmentValidation(appointmentId))
            .When(x => x.AppointmentId > 0).WithMessage("'Appointment' already booked");
        }