Exemplo n.º 1
0
 public CampaignController(ICampaignService campaignService,
                           IDateTimeHelper dateTimeHelper, IEmailAccountService emailAccountService,
                           EmailAccountSettings emailAccountSettings,
                           INewsLetterSubscriptionService newsLetterSubscriptionService,
                           ILocalizationService localizationService, IMessageTokenProvider messageTokenProvider,
                           IPermissionService permissionService,
                           ILanguageService languageService,
                           ILocalizedEntityService localizationEntityService,
                           IWorkContext workContext,
                           ICategoryService categoryService,
                           CampaignSettings campaignSettings,
                           ISettingService settingService,
                           INewsletterDatesService newsletterDatesService)
 {
     this._campaignService               = campaignService;
     this._dateTimeHelper                = dateTimeHelper;
     this._emailAccountService           = emailAccountService;
     this._emailAccountSettings          = emailAccountSettings;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._localizationService           = localizationService;
     this._messageTokenProvider          = messageTokenProvider;
     this._permissionService             = permissionService;
     this._languageService               = languageService;
     this._localizationEntityService     = localizationEntityService;
     this._workContext            = workContext;
     this._categoryService        = categoryService;
     this._campaignSettings       = campaignSettings;
     this._settingService         = settingService;
     this._newsletterDatesService = newsletterDatesService;
 }
 public RandomContactMessageEventsFactory(CampaignSettings campaign)
 {
     _contactRepository    = new ContactRepository();
     _campaign             = campaign;
     _getRandomCityService = new GetRandomCityService();
     _geoDataRepository    = new GeoDataRepository();
 }
 public void Add(CampaignSettings item)
 {
     lock (_session)
     {
         _session.Store(item);
     }
 }
 /// <summary>
 /// Validate the object.
 /// </summary>
 /// <exception cref="Microsoft.Rest.ValidationException">
 /// Thrown if validation fails
 /// </exception>
 public virtual void Validate()
 {
     if (CampaignSettings != null)
     {
         CampaignSettings.Validate();
     }
 }
 public GenerateCampaignDataService(Guid exmCampaignId, CampaignSettings campaign)
 {
     _campaign                          = campaign;
     _exmCampaignId                     = exmCampaignId;
     _contactListRepository             = new ContactListRepository();
     _adjustEmailStatisticsService      = new AdjustEmailStatisticsService();
     _randomContactMessageEventsFactory = new RandomContactMessageEventsFactory(_campaign);
 }
        public void AdjustEmailStatistics(Job job, MessageItem messageItem, CampaignSettings campaign)
        {
            SetStatisticsOnCampaignAndEngagementPlan(messageItem);

            SetStatisticsOnMessageItem(messageItem, campaign.StartDate, campaign.EndDate);

            SetStatisticsOnCampaignItem(messageItem, campaign.StartDate, campaign.EndDate);

            SetStatisticsInEXMDatabase(job, messageItem, campaign.StartDate, campaign.EndDate);
        }
Exemplo n.º 7
0
 public CampaignSettingsForm(CampaignSettings settings)
 {
     this.InitializeComponent();
     this.fSettings        = settings;
     this.HPBox.Value      = (int)(this.fSettings.HP * 100);
     this.XPBox.Value      = (int)(this.fSettings.XP * 100);
     this.AttackBox.Value  = this.fSettings.AttackBonus;
     this.ACBox.Value      = this.fSettings.ACBonus;
     this.DefenceBox.Value = this.fSettings.NADBonus;
 }
        public void AdjustEmailStatistics(EcmDataProvider ecmDataProvider, IRecipientManager recipientManager, Job job, MessageItem messageItem,
                                          CampaignSettings campaign)
        {
            _recipientManager = recipientManager;
            _ecmDataProvider  = ecmDataProvider;
            SetStatisticsOnMessageItem(messageItem, campaign.StartDate, campaign.EndDate);

            SetStatisticsOnCampaignItem(messageItem, campaign.StartDate, campaign.EndDate);

            SetStatisticsInExmDatabase(job, messageItem, campaign.StartDate, campaign.EndDate);
        }
Exemplo n.º 9
0
        public void Update(CampaignSettings item)
        {
            var entity = _dbContext.Query <CampaignSettingsEntity>()
                         .FirstOrDefault(cs => cs.Id == item.Id);

            if (entity != null)
            {
                _mapper.Map(item, entity);
                _dbContext.Update(entity, post => post.MapTo(item), _mapper);
            }
        }
Exemplo n.º 10
0
        public CampaignSettingsForm(CampaignSettings settings)
        {
            InitializeComponent();

            fSettings = settings;

            HPBox.Value      = (int)(fSettings.HP * 100);
            XPBox.Value      = (int)(fSettings.XP * 100);
            AttackBox.Value  = fSettings.AttackBonus;
            ACBox.Value      = fSettings.ACBonus;
            DefenceBox.Value = fSettings.NADBonus;
        }
Exemplo n.º 11
0
 public GenerateCampaignDataService(Guid exmCampaignId, CampaignSettings campaign)
 {
     _campaign                = campaign;
     _exmCampaignId           = exmCampaignId;
     _contactListRepository   = new ContactListRepository();
     _exmCampaignService      = (IExmCampaignService)ServiceLocator.ServiceProvider.GetService(typeof(IExmCampaignService));
     _dispatchManager         = (IDispatchManager)ServiceLocator.ServiceProvider.GetService(typeof(IDispatchManager));
     _ecmDataProvider         = (EcmDataProvider)ServiceLocator.ServiceProvider.GetService(typeof(EcmDataProvider));
     _recipientManagerFactory = (IRecipientManagerFactory)ServiceLocator.ServiceProvider.GetService(typeof(IRecipientManagerFactory));
     _logger      = (ILogger)ServiceLocator.ServiceProvider.GetService(typeof(ILogger));
     _itemUtilExt = (ItemUtilExt)ServiceLocator.ServiceProvider.GetService(typeof(ItemUtilExt));
     _adjustEmailStatisticsService      = new AdjustEmailStatisticsService();
     _randomContactMessageEventsFactory = new RandomContactMessageEventsFactory(_campaign);
 }
Exemplo n.º 12
0
        public AuthService(
            IUserService userService,
            IUser user,
            IUsuarioAcessoRepository usuarioAcessoRepository,
            ICampanhaRepository campanhaRepository,
            IOptions <CampaignSettings> options,
            IHttpContextAccessor contextAccessor,
            IUsuarioRepository usuarioRepository,

            ILogger <AuthenticationService> logger)
        {
            _userService             = userService;
            _user                    = user;
            _usuarioAcessoRepository = usuarioAcessoRepository;
            _contextAccessor         = contextAccessor;
            _usuarioRepository       = usuarioRepository;
            _logger                  = logger;
            _campaignSettings        = options.Value;
            _campanhaRepository      = campanhaRepository;
        }
Exemplo n.º 13
0
 public FileService(
     ILogger <FileService> logger,
     IFileUserStatusService fileUserStatusService,
     IFileProductService fileProductService,
     ICampanhaFaseRepository campanhaFaseRepository,
     ICampanhaRepository campanhaRepository,
     IFileUserService fileUserService,
     IArquivoRepository arquivoRepository,
     IOptions <CampaignSettings> options,
     IOptions <PathFilesSettings> optionsFile)
 {
     _logger = logger;
     _fileUserStatusService  = fileUserStatusService;
     _fileProductService     = fileProductService;
     _fileUserService        = fileUserService;
     _campanhaFaseRepository = campanhaFaseRepository;
     _campanhaRepository     = campanhaRepository;
     _arquivoRepository      = arquivoRepository;
     _campaignSettings       = options.Value;
     _pathFilesSettings      = optionsFile.Value;
 }
Exemplo n.º 14
0
 public ProductService(
     IAuthService authService,
     IOptions <CampaignSettings> options,
     IUser user,
     IUsuarioRepository usuarioRepository,
     IUsuarioPremioRepository usuarioPremioRepository,
     IProdutoRepository produtoRepository,
     ICampanhaProdutoRepository campanhaProdutoRepository,
     IProdutoCampanhaRepository produtoCampanhaRepository,
     IMapper mapper,
     ILogger <ProductService> logger)
 {
     _produtoRepository         = produtoRepository;
     _campanhaProdutoRepository = campanhaProdutoRepository;
     _produtoCampanhaRepository = produtoCampanhaRepository;
     _authService             = authService;
     _logger                  = logger;
     _mapper                  = mapper;
     _user                    = user;
     _usuarioRepository       = usuarioRepository;
     _usuarioPremioRepository = usuarioPremioRepository;
     _campaignSettings        = options.Value;
 }
Exemplo n.º 15
0
 public void Add(CampaignSettings item) =>
 _dbContext.Add(_mapper.Map <CampaignSettingsEntity>(item));
Exemplo n.º 16
0
 public Campaign(CampaignSettings settings)
 {
     Settings = settings;
 }