public MessageService(
            IDallasArtContext dallasArtContext,
            ICustomerRoleService customerRoleService,
            IStoreContext storeContext,
            IMessageTokenProvider messageTokenProvider,
            ILanguageService languageService,
            EmailAccountSettings emailAccountSettings,
            IEmailAccountService emailAccountService,
            IMessageTemplateService messageTemplateService,
            IEventPublisher eventPublisher,
            ICustomerService customerService,
            //           IEnrollmentRequestService enrollmentRequestService,
            IWorkContext workContext,
            //           ICustomerAttributeService customerAttributeService,
            ILogger logger

            )
        {
            this._dallasArtContext       = dallasArtContext;
            this._messageTokenProvider   = messageTokenProvider;
            this._languageService        = languageService;
            this._emailAccountSettings   = emailAccountSettings;
            this._emailAccountService    = emailAccountService;
            this._messageTemplateService = messageTemplateService;
            this._eventPublisher         = eventPublisher;
            this._customerService        = customerService;
            //   this._enrollmentRequestService = enrollmentRequestService;
            this._store               = storeContext.CurrentStore;
            this._workContext         = workContext;
            this._customerRoleService = customerRoleService;
            //           this._customerAttributeService = customerAttributeService;
            this._logger = logger;
        }
Exemple #2
0
        public SelfIdentificationValidator(
            ILocalizationService localizationService,
            IDallasArtContext dallasArtContext
            )
        {
            RuleFor(x => x.FirstName).NotEmpty().WithMessage("Required");   //(localizationService.GetResource("DallasArt.Contact.Fields.FirstName.Required"));
            RuleFor(x => x.LastName).NotEmpty().WithMessage("Required");    //(localizationService.GetResource("DallasArt.Contact.Fields.LastName.Required"));


            if (dallasArtContext.NeedsEmail)
            {
                RuleFor(x => x.Email).NotEmpty().WithMessage("Required");                       //(localizationService.GetResource("DallasArt.Contact.Fields.Email.Required"));
                RuleFor(x => x.Email).EmailAddress().WithMessage("Invalid");                    //(localizationService.GetResource("DallasArt.Contact.Fields.Email.Address.Invalid"));

                RuleFor(x => x.ConfirmEmail).NotEmpty().WithMessage("Required");                //(localizationService.GetResource("DallasArt.Contact.Fields.EmailConfirm.Required"));
                RuleFor(x => x.ConfirmEmail).Equal(x => x.Email).WithMessage("Email Mismatch"); //(localizationService.GetResource("Dallasart.Contact.Fields.Email.ConfirmEmail.EnteredFields.DoNotMatch"));
            }

            if (dallasArtContext.NeedsPhone)
            {
                RuleFor(x => x.Phone).NotEmpty().WithMessage("Required");   //(localizationService.GetResource("Dallasart.Contact.Fields.PhoneNumber.Required"));
                //  RuleFor(x => x.Phone).Matches(@"(?:\d{3})[- ]?\d{3}[- ]?\d{4}").WithMessage("Phone Number must Be entered with dashes (xxx-xxx-xxxx)")  ;
                //RuleFor(x => x.Phone).Matches(@"(?:\(\d{3}\)|\d{3})[- ]?\d{3}[- ]?\d{4}");

                RuleFor(x => x.ConfirmPhone).NotEmpty().WithMessage("Required");   //(localizationService.GetResource("Dallasart.Contact.Fields.ConfirmPhoneNumber.Required"));
                // RuleFor(x => x.ConfirmPhone).Matches(@"(?:\d{3})[- ]?\d{3}[- ]?\d{4}").WithMessage("Phone Number must Be entered with dashes (xxx-xxx-xxxx)");

                RuleFor(x => x.ConfirmPhone).Equal(x => x.Phone).WithMessage("Phone # Mismatch");   //(localizationService.GetResource("Dallasart.Contact.Fields.PhoneNumber.ConfirmPhoneNumber.EnteredFields.DoNotMatch"));
            }

            if (dallasArtContext.NeedsPassword)
            {
                RuleFor(x => x.Password).NotEmpty().WithMessage(localizationService.GetResource("DallasArt.Contact.Fields.Password.Required"));
                RuleFor(x => x.Password).Length(8, 100).WithMessage(localizationService.GetResource("Dallasart.contact.fields.password.min.length"));
                RuleFor(x => x.ConfirmPassword).NotEmpty().WithMessage(localizationService.GetResource("DallasArt.Contact.Fields.ConfirmPassword.Required"));
                RuleFor(x => x.ConfirmPassword).Equal(x => x.Password).WithMessage(localizationService.GetResource("Dallasart.Contact.Fields.Password.ConfirmPassword.EnteredFields.donotmatch"));
            }

            if (
                dallasArtContext.IsRegistration ||
                dallasArtContext.IsEnrollment
                )
            {
                RuleFor(x => x.SelectedAnswer).NotEmpty().WithMessage(localizationService.GetResource("Dallasart.contact.fields.question.response.yesno"));
            }


            if (dallasArtContext.NeedMembershipStatus)
            {
                RuleFor(x => x.RadioButtionList.SelectedRole).GreaterThan(0).WithMessage("Please Select Member or Non-Member Status");
            }
        }
 public ContactController(
     IDallasArtContext dallasArtContext,
     IStoreContext storeContext,
     IContactRequestService contactRequestServiceService,
     IEventPublisher eventPublisher,
     IWorkContext workContext
     )
 {
     this._storeContext                 = storeContext;
     this._dallasArtContext             = dallasArtContext;
     this._storeContext                 = storeContext;
     this._contactRequestServiceService = contactRequestServiceService;
     this._eventPublisher               = eventPublisher;
     this._workContext = workContext;
 }
 public EntityTokensAddedEventConsumerCustomer
 (
     IStoreContext storeContext,
     IDallasArtContext dallasArtContext,
     IWorkContext workContext,
     //      IEnrollmentRequestService requestService,
     ILogger logger
 )
 {
     this._storeContext     = storeContext;
     this._dallasArtContext = dallasArtContext;
     this._workContext      = workContext;
     this._customer         = workContext.CurrentCustomer;
     //    this._requestService = requestService;
     this._logger = logger;
 }
Exemple #5
0
 public RegisterCustomerController(
     CustomerSettings customerSettings,
     IWorkContext workContext,
     IDallasArtContext dallasArtContext,
     ICustomerService customerService,
     ICustomerRegistrationService customerRegistrationService,
     IStoreContext storeContext
     )
 {
     this._customerSettings            = customerSettings;
     this._workContext                 = workContext;
     this._dallasArtContext            = dallasArtContext;
     this._customerService             = customerService;
     this._customerRegistrationService = customerRegistrationService;
     this._storeContext                = storeContext;
 }
Exemple #6
0
 public ArtworkEntryController(
     CustomerSettings customerSettings,
     IWorkContext workContext,
     IDallasArtContext dallasArtContext,
     ICustomerService customerService,
     ICustomerRegistrationService customerRegistrationService,
     IStoreContext storeContext,
     IMembershipService membershipService
     )
 {
     this._customerSettings            = customerSettings;
     this._workContext                 = workContext;
     this._dallasArtContext            = dallasArtContext;
     this._customerService             = customerService;
     this._customerRegistrationService = customerRegistrationService;
     this._storeContext                = storeContext;
     this._membershipService           = membershipService;
 }
        public PaidMembershipController(

            IDallasArtContext dallasArtContext,
            IStoreContext storeContext,
            IContactRequestService contactRequestServiceService,
            IEventPublisher eventPublisher,
            IWorkContext workContext,
            ICustomerService customerService,
            ICustomerServices customerServices

            )
        {
            this._storeContext                 = storeContext;
            this._dallasArtContext             = dallasArtContext;
            this._storeContext                 = storeContext;
            this._contactRequestServiceService = contactRequestServiceService;
            this._eventPublisher               = eventPublisher;
            this._workContext      = workContext;
            this._customerService  = customerService;
            this._customerServices = customerServices;
        }
 public DashBoardValidation(ILocalizationService localizationService, IWorkContext workContext, IDallasArtContext dallasArtContext)
 {
     RuleFor(x => x.EmailAddress).NotEmpty().WithMessage("Email Address Is Required");
 }
        public PaaMemberValidator(ILocalizationService localizationService, IWorkContext workContext, IDallasArtContext dallasArtContext)
        {
            RuleFor(x => x.Email).NotEmpty().WithMessage("Email Address Is Required");
            RuleFor(x => x.SelectedRole).NotEqual((Services.MembershipService.SelectedRole) 0).WithMessage("Please Select Membership Type");

            RuleFor(x => x.FirstName).NotEmpty().WithMessage("First Name Is Required");
            RuleFor(x => x.LastName).NotEmpty().WithMessage("Last Name Is Required");

            RuleFor(x => x.StreetAddress).NotEmpty().WithMessage("Street Address Is Required");
            RuleFor(x => x.City).NotEmpty().WithMessage("City Name Is Required");

            RuleFor(x => x.SelectState).NotEqual((Classes.Enums.States) 0).WithMessage("Please Select State");
            RuleFor(x => x.ZipCode).NotEmpty().WithMessage("ZipCode is Required");

            RuleFor(x => x.Phone).NotEmpty().WithMessage("Phone Number is Required");

            RuleFor(x => x.Renewal).NotEmpty().WithMessage("Renewal Date is Required");
        }
 public OrderTrackingConsumerOrderPlaced(IOrderTrackingService orderTrackingService, IDallasArtContext dallasArtContext)
 {
     _dallasArtContext     = dallasArtContext;
     _orderTrackingService = orderTrackingService;
 }
        public RegistrationValidation(ILocalizationService localizationService, IWorkContext workContext, IDallasArtContext dallasArtContext)
        {
            if (workContext.CurrentCustomer.IsRegistered())
            {
                return;
            }

            if (dallasArtContext.IsRegistation)
            {
                RuleFor(x => x.CenterNameRequest).NotEmpty().WithMessage("Center Name is Required!");

                RuleFor(x => x.CenterGroupIdRequest).NotEmpty().WithMessage("CenterId is Required!");
            }

            if (dallasArtContext.IsEnrollment)
            {
                if (!dallasArtContext.IsPresetEnrollment)
                {
                    RuleFor(x => x.CenterNameRequest).NotEmpty().WithMessage("Center Name is Required!");
                }

                RuleFor(x => x.EnrollmentType).NotEmpty().WithMessage("Center Enrollment Type is Required!");
            }
        }