Beispiel #1
0
        public CampaignController(
            ICampaignService campaignService,
            ITShirtCostService tshirtService,
            IProductService productService,
            IPromotionService promotionService,
            IRepository<CurrencyRecord> currencyRepository,
            IWorkContextAccessor wca,
            INotifier notifier,
            IOrchardServices services,
            ICookieCultureService cookieCultureService,
            ICountryService countryService)
        {
            _currencyRepository = currencyRepository;
            Services = services;
            _tshirtService = tshirtService;
            _productService = productService;
            _campaignService = campaignService;
            _promotionService = promotionService;
            _wca = wca;
            _notifier = notifier;
            Logger = NullLogger.Instance;

            _cookieCultureService = cookieCultureService;
            //var culture = _wca.GetContext().CurrentCulture.Trim();
            _cultureUsed = _wca.GetContext().CurrentCulture.Trim();
            //cultureUsed = culture == "en-SG" ? "en-SG" : (culture == "id-ID" ? "id-ID" : "en-MY");
            _countryService = countryService;
        }
 private CommandManager GetManager()
 {
     productService  = new ProductService();
     orderService    = new OrderService();
     campaignService = new CampaignService(orderService);
     return(new CommandManager(productService, campaignService, orderService));
 }
Beispiel #3
0
 public ReportsController(ICallQueueService callQueueService, ISettings settings, ICallCenterReportService callCenterReportService,
                          ICallQueueCustomerReportService callQueueCustomerReportService, IHealthPlanCallQueueCriteriaService callQueueCriteriaService,
                          IHealthPlanEventService eventService, ICampaignService campaignService, IOrganizationRepository organizationRepository,
                          IHealthPlanOutboundCallQueueService healthPlanOutboundCallQueueService, ICallQueueCustomerRepository callQueueCustomerRepository,
                          IHealthPlanCallQueueCriteriaService healthPlanCallQueueCriteriaService, IConfirmationReportingService confirmationReportingService,
                          ICallSkippedReportService callSkippedReportService, IUserRepository <User> userRepository, IGmsExcludedCustomerService gmsExcludedCustomerService,
                          IPreAssessmentReportingService preAssessmentReportingService)
 {
     _callQueueService               = callQueueService;
     _callCenterReportService        = callCenterReportService;
     _callQueueCustomerReportService = callQueueCustomerReportService;
     _callQueueCriteriaService       = callQueueCriteriaService;
     _eventService           = eventService;
     _campaignService        = campaignService;
     _organizationRepository = organizationRepository;
     _pageSize        = settings.DefaultPageSizeForReports;
     _zipRangeInMiles = settings.ZipRangeInMiles;
     _healthPlanOutboundCallQueueService = healthPlanOutboundCallQueueService;
     _callQueueCustomerRepository        = callQueueCustomerRepository;
     _healthPlanCallQueueCriteriaService = healthPlanCallQueueCriteriaService;
     _confirmationReportingService       = confirmationReportingService;
     _callSkippedReportService           = callSkippedReportService;
     _userRepository                = userRepository;
     _gmsExcludedCustomerService    = gmsExcludedCustomerService;
     _preAssessmentReportingService = preAssessmentReportingService;
 }
 public CampaignController(ICampaignService campaignService,
                           IDateTimeHelper dateTimeHelper,
                           IEmailAccountService emailAccountService,
                           EmailAccountSettings emailAccountSettings,
                           INewsLetterSubscriptionService newsLetterSubscriptionService,
                           ILocalizationService localizationService,
                           IMessageTokenProvider messageTokenProvider,
                           IStoreContext storeContext,
                           IStoreService storeService,
                           IPermissionService permissionService,
                           ICustomerService customerService,
                           ICustomerActivityService customerActivityService)
 {
     this._campaignService               = campaignService;
     this._dateTimeHelper                = dateTimeHelper;
     this._emailAccountService           = emailAccountService;
     this._emailAccountSettings          = emailAccountSettings;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._localizationService           = localizationService;
     this._messageTokenProvider          = messageTokenProvider;
     this._storeContext            = storeContext;
     this._storeService            = storeService;
     this._permissionService       = permissionService;
     this._customerService         = customerService;
     this._customerActivityService = customerActivityService;
 }
Beispiel #5
0
 public static void InsertCampaign(ICampaignService campaignService, ICategoryService categoryService)
 {
     InsertCampaignItem(campaignService, categoryService.GetByName("Kitap").Id, 5, 10, default(decimal), DiscountType.RATE);
     InsertCampaignItem(campaignService, categoryService.GetByName("Kitap").Id, 10, default(int), 20, DiscountType.AMOUNT);
     InsertCampaignItem(campaignService, categoryService.GetByName("Giyim").Id, 3, default(int), 30, DiscountType.AMOUNT);
     Console.WriteLine("*** Kampanyalar Tanımlandı ***");
 }
Beispiel #6
0
 public ShoppingCartService(IProductService productService, IDeliveryCostCalculatorService deliveryCostCalculatorService, ICampaignService campaignService)
 {
     ProductService = productService;
     DeliveryCostCalculatorService = deliveryCostCalculatorService;
     CampaignService = campaignService;
     cart            = new Models.ShoppingCart();
 }
 public ScenarioApplierTests()
 {
     _productService  = new ProductService();
     _campaignService = new CampaignService(_productService);
     _orderService    = new OrderService(_productService, _campaignService);
     _scenarioApplier = new ScenarioApplier(_productService, _orderService, _campaignService);
 }
 public MarketingController(ICampaignService campaignService, IGroupService groupService, IUserService userService, IProductService productService)
 {
     this.campaignService = campaignService;
     this.groupService = groupService;
     this.userService = userService;
     this.productService = productService;
 }
        public void Initialize()
        {
            InitializeAutoMapper.Initialize();
            mockRepository                = new MockRepository(MockBehavior.Default);
            mockCampaignRepository        = mockRepository.Create <ICampaignRepository>();
            mockContactRepository         = mockRepository.Create <IContactRepository>();
            mockTagRepository             = mockRepository.Create <ITagRepository>();
            mockUrlService                = mockRepository.Create <IUrlService>();
            mockIndexingService           = mockRepository.Create <IIndexingService>();
            mockSearchService             = mockRepository.Create <ISearchService <Campaign> >();
            mockContactSearchService      = mockRepository.Create <ISearchService <Contact> >();
            mockCachingService            = mockRepository.Create <ICachingService>();
            mockAdvancedSearchService     = mockRepository.Create <IAdvancedSearchService>();
            mockUserService               = mockRepository.Create <IUserService>();
            mockUserRepository            = mockRepository.Create <IUserRepository>();
            mockAccountService            = mockRepository.Create <IAccountService>();
            mockMessageService            = mockRepository.Create <IMessageService>();
            mockCommunicaitonService      = mockRepository.Create <ICommunicationService>();
            mockServiceProviderRepository = mockRepository.Create <IServiceProviderRepository>();
            IUnitOfWork mockUnitOfWork = mockRepository.Create <IUnitOfWork>().Object;

            CampaignMockData campaignMockData = new CampaignMockData();

            campaignService = new CampaignService(mockCampaignRepository.Object,
                                                  mockContactRepository.Object, mockUnitOfWork, mockUrlService.Object, mockTagRepository.Object,
                                                  mockCachingService.Object, mockIndexingService.Object, mockSearchService.Object,
                                                  mockAdvancedSearchService.Object, mockUserService.Object, mockUserRepository.Object, mockMessageService.Object, mockCommunicaitonService.Object,
                                                  mockAccountService.Object, mockServiceProviderRepository.Object, mockContactSearchService.Object);
        }
Beispiel #10
0
        public CampaignModule(ICampaignService campaignService, ITagInfoService tagInfoService, ICampaignTagMappingService campaignTagMappingService, ICampaignTypeService campaignTypeService, IChannelInfoService channelInfoService, ITaFieldInfoService taFieldInfoService, ICampaignKeywordSettingService campaignKeywordSettingService, ITaInfoService taInfoService, ISMSService smsService, ICampaignStepInfoService campaignStepInfoService, ISystemJobInfoService systemJobInfoService)
            : base()
        {
            this.CampaignService = campaignService;
            this.TagInfoService = tagInfoService;
            this.CampaignTagMappingService = campaignTagMappingService;
            this.CampaignTypeService = campaignTypeService;
            this.ChannelInfoService = channelInfoService;
            this.TaFieldInfoService = taFieldInfoService;
            this.CampaignKeywordSettingService = campaignKeywordSettingService;
            this.TaInfoService = taInfoService;
            this.SMSService = smsService;
            this.CampaignStepInfoService = campaignStepInfoService;
            this.SystemJobInfoService = systemJobInfoService;

            this.Get[CampaignMetadataModule.CampaignList, PathApiCampaignList] = _ => this.RunHandler<ReqGetCampaignList, Negotiator>(this.GetCampaignList);
            this.Post[CampaignMetadataModule.AddCampaign, PathApiAddCampaign] = p => this.RunHandler<ReqAddCampaign, Negotiator>(this.AddCampaign);
            this.Put[CampaignMetadataModule.UpdateCampaign, PathApiUpdateCampaign] = _ => this.RunHandler<ReqCampaignUpdate, Negotiator>(this.UpdateCampaign);
            this.Delete[CampaignMetadataModule.DeleteCampaign, PathApiDeleteCampaign] = _ => this.RunHandler<ReqCampaignDelete, Negotiator>(this.DeleteCampaign);
            this.Get[CampaignMetadataModule.CampaignDateRange, PathApiCampaignDateRange] = this.CampaignDateRange;
            this.Get[CampaignMetadataModule.GetCampaignTypeList, PathApiGetCampaignTypeList] = this.GetCampaignTypeList;
            this.Get[CampaignMetadataModule.GetCampaignConfig, PathApiGetCampaignConfig] = _ => this.RunHandler<ReqGetCampaignById, Negotiator>(this.GetCampaignConfig);
            this.Get[CampaignMetadataModule.GetTagInfoList, PathApiGetTagInfoList] = this.GetTagInfoList;
            this.Get[CampaignMetadataModule.GetSmsKeywordList, PathApiGetSmsKeywordList] = _ => this.RunHandler<ReqCampaignGetSmsKeywordList, Negotiator>(this.GetSmsKeywordList);
            this.Post[CampaignMetadataModule.CampaignAddSmsKeyword, PathApiCampaignAddSmsKeyword] = this.CampaignAddSmsKeyword;
            this.Put[CampaignMetadataModule.UpdateSmsKeyword, PathApiUpdateSmsKeyword] = _ => this.RunHandler<ReqCampaignUpdateSmsKeywordList, Negotiator>(this.UpdateSmsKeyword);
            this.Get[CampaignMetadataModule.GetProfileFields, PathApiGetProfileFields] = _ => this.RunHandler<ReqGetProfileFields, Negotiator>(this.GetProfileFields);
            this.Get[CampaignMetadataModule.CampaignSmsVender, PathApiCampaignSmsVender] = this.CampaignSmsVender;
            this.Get[CampaignMetadataModule.GetServerTime, PathApiGetServerTime] = this.GetServerTime;
            this.Put[CampaignMetadataModule.SetChannelSwitch, PathApiSetChannelSwitch] = _ => this.RunHandler<ReqCampaignSetChannelSwitch, Negotiator>(this.SetChannelSwitch);
            //Updated by Eric 20150728
            //EventHandling & Logger測試方法
            this.Get["TEST", "/et/campaigns/errortest/action"] = this.ErrorTestAction;
        }
Beispiel #11
0
        public AdminCampaignsSettingsController(
            IRepository <CampaignStatusRecord> campaignStatusRepository,
            ICampaignService campaignService,
            IShapeFactory shapeFactory,
            IimageHelper imageHelper,
            ITeeyootMessagingService teeyootMessagingService,
            INotifier notifier,
            IRepository <ProductColorRecord> repositoryColor,
            ShellSettings shellSettings,
            IRepository <CurrencyRecord> currencyRepository,
            IRepository <UserPartRecord> users)
        {
            _campaignStatusRepository = campaignStatusRepository;
            _campaignService          = campaignService;
            _imageHelper             = imageHelper;
            _teeyootMessagingService = teeyootMessagingService;
            _currencyRepository      = currencyRepository;

            Shape            = shapeFactory;
            T                = NullLocalizer.Instance;
            Logger           = NullLogger.Instance;
            _notifier        = notifier;
            _repositoryColor = repositoryColor;
            _users           = users;
            _shellSettings   = shellSettings;
        }
 public DonationController(
     UserManager <ApplicationUser> userManager,
     IDonationService donationService,
     IOptions <StripeSettings> stripeSettings,
     ICampaignService campaignService,
     ILoggerServicecs loggerServicer,
     IHttpContextAccessor httpContextAccessor,
     IOptions <CurrencySettings> currencySettings,
     ICurrencyService currencyService,
     IStringLocalizer <DonationController> localizer,
     ICountryService countryService,
     CountrySeeder countrySeeder)
 {
     _userManager         = userManager;
     _donationService     = donationService;
     _stripeSettings      = stripeSettings;
     _campaignService     = campaignService;
     _loggerService       = loggerServicer;
     _httpContextAccessor = httpContextAccessor;
     _currencySettings    = currencySettings;
     _currencyService     = currencyService;
     _countryService      = countryService;
     _localizer           = localizer;
     countrySeeder.Seed();
 }
Beispiel #13
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;
 }
Beispiel #14
0
 public LeadController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ITaskService taskService,
     ViewDataHelper viewdataHelper,
     ICampaignService campaignService,
     ITagService tagService)
 {
     _leadService = LeadService;
     _contactService = contactService;
     _membershipService = membershipService;
     _roleService = roleService;
     _noteService = noteService;
     _activityService = activityService;
     _saleService = saleService;
     _taskService = taskService;
     _viewdataHelper = viewdataHelper;
     _campaignService = campaignService;
     _tagService = tagService;
 }
Beispiel #15
0
        // GET: Home

        public HomeController(
            IRepository<CurrencyRecord> currencyRepository,
            IRepository<OrderStatusRecord> orderStatusRepository,
            IOrderService orderService,
            ICampaignService campaignService,
            IShapeFactory shapeFactory,
            IContentManager contentManager,
            ISiteService siteService,
            IPayoutService payoutService,
            INotifier notifierService,
            ITeeyootMessagingService teeyootMessagingService,
            IWorkContextAccessor workContextAccessor)
        {
            _currencyRepository = currencyRepository;
            _orderStatusRepository = orderStatusRepository;
            _orderService = orderService;
            _campaignService = campaignService;
            _contentManager = contentManager;
            _siteService = siteService;
            _payoutService = payoutService;
            _notifierService = notifierService;
            _teeyootMessagingService = teeyootMessagingService;
            Shape = shapeFactory;

            T = NullLocalizer.Instance;
            _workContextAccessor = workContextAccessor;
        }
 public SearchController(
     ILeadService LeadService,
     IContactService contactService,
     IMembershipService membershipService,
     IRoleService roleService,
     INoteService noteService,
     IActivityService activityService,
     ISaleService saleService,
     ITaskService taskService,
     ViewDataHelper viewdataHelper,
     ICampaignService campaignService,
     ITagService tagService)
 {
     _leadService       = LeadService;
     _contactService    = contactService;
     _membershipService = membershipService;
     _roleService       = roleService;
     _noteService       = noteService;
     _activityService   = activityService;
     _saleService       = saleService;
     _taskService       = taskService;
     _viewdataHelper    = viewdataHelper;
     _campaignService   = campaignService;
     _tagService        = tagService;
 }
 public MessageTemplateController(
     IMessageTemplateService messageTemplateService,
     ICampaignService campaignService,
     IMessageFactory messageFactory,
     IEmailAccountService emailAccountService,
     IEmailSender emailSender,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService,
     ILocalizationService localizationService,
     IPermissionService permissionService,
     IStoreService storeService,
     IStoreMappingService storeMappingService,
     EmailAccountSettings emailAccountSettings)
 {
     _messageTemplateService = messageTemplateService;
     _campaignService        = campaignService;
     _messageFactory         = messageFactory;
     _emailAccountService    = emailAccountService;
     _emailSender            = emailSender;
     _languageService        = languageService;
     _localizedEntityService = localizedEntityService;
     _localizationService    = localizationService;
     _permissionService      = permissionService;
     _storeService           = storeService;
     _storeMappingService    = storeMappingService;
     _emailAccountSettings   = emailAccountSettings;
 }
Beispiel #18
0
        public ImageController(ICampaignService campaignService)
        {
            this.campaignService = campaignService;
            var identity = (ClaimsPrincipal)Thread.CurrentPrincipal;

            accountId = identity.Claims.Where(c => c.Type == "AccountID").Select(c => c.Value).SingleOrDefault();
        }
Beispiel #19
0
 public EventService(ISecurityService securityService, IUnitOfWork unitOfWork, ICampaignService campaignService, IGroupService groupService)
 {
     _securityService = securityService;
     _unitOfWork      = unitOfWork;
     _campaignService = campaignService;
     _groupService    = groupService;
 }
Beispiel #20
0
 public CampaignController(IOrderService orderService, ICampaignService campaignService, IProductService productService, ITimeService timeService)
 {
     _orderService    = orderService;
     _campaignService = campaignService;
     _productService  = productService;
     _timeService     = timeService;
 }
Beispiel #21
0
        public OrderService(
            IRepository <OrderRecord> orderRepository,
            IRepository <LinkOrderCampaignProductRecord> ocpRepository,
            ICampaignService campaignService,
            IRepository <ProductSizeRecord> sizeRepository,
            IRepository <OrderStatusRecord> orderStatusRepository,
            IRepository <OrderHistoryRecord> orderHistoryRepository,
            IRepository <ProductColorRecord> colorRepository,
            IRepository <CampaignRecord> campaignRepository,
            IOrchardServices orchardServices,
            IRepository <UserPartRecord> UserPartRepository,
            IRepository <CurrencyRecord> currencyRrpository,
            ICampaignService CampaignService

            )
        {
            _orderRepository        = orderRepository;
            _ocpRepository          = ocpRepository;
            _campaignService        = campaignService;
            _sizeRepository         = sizeRepository;
            _orderStatusRepository  = orderStatusRepository;
            _orderHistoryRepository = orderHistoryRepository;
            _colorRepository        = colorRepository;
            _campaignRepository     = campaignRepository;
            _orchardServices        = orchardServices;
            _userPartRepository     = UserPartRepository;
            _currencyRrpository     = currencyRrpository;
        }
Beispiel #22
0
 public HomeController(ILocationService locationService, ISpecialityService specialityService, IDoctorProfileService doctorService, ICampaignService campaignService)
 {
     _locationService   = locationService;
     _specialityService = specialityService;
     _doctorService     = doctorService;
     _campaignService   = campaignService;
 }
        public DashboardController(IRepository <CampaignCategoriesRecord> campaignCategoryRepository,
                                   IRepository <LinkCampaignAndCategoriesRecord> linkCampaignAndCategoryRepository,
                                   ICampaignService campaignService,
                                   IMailChimpSettingsService settingsService,
                                   IOrderService orderService,
                                   IWorkContextAccessor wca,
                                   IStoreService storeService,
                                   IimageHelper imageHelper,
                                   IMembershipService membershipService,
                                   IPayoutService payoutService,
                                   IOrchardServices services,
                                   IContentManager contentManager,
                                   IPromotionService promotionService,
                                   IPaymentInformationService paymentInfService,
                                   ICampaignCategoriesService campaignCategoryService,
                                   IRepository <CurrencyRecord> currencyRepository,
                                   IMessageService messageService,
                                   ITShirtCostService tshirtService,
                                   IProductService productService,
                                   INotifier notifier,
                                   ICookieCultureService cookieCultureService,
                                   ITeeyootMessagingService teeyootMessagingService,
                                   IWorkContextAccessor workContextAccessor,
                                   ITShirtCostService costService,
                                   IPriceConversionService priceConversionService,
                                   IRepository <TeeyootUserPart> users
                                   )
        {
            _campaignCategoryRepository        = campaignCategoryRepository;
            _linkCampaignAndCategoryRepository = linkCampaignAndCategoryRepository;
            _cookieCultureService = cookieCultureService;
            _campaignService      = campaignService;
            _currencyRepository   = currencyRepository;
            _orderService         = orderService;
            _wca = wca;
            this._settingsService    = settingsService;
            this._orderService       = orderService;
            _storeService            = storeService;
            _imageHelper             = imageHelper;
            _membershipService       = membershipService;
            _contentManager          = contentManager;
            _payoutService           = payoutService;
            _promotionService        = promotionService;
            _campaignCategoryService = campaignCategoryService;
            _paymentInfService       = paymentInfService;
            _messageService          = messageService;
            _tshirtService           = tshirtService;
            _productService          = productService;
            _notifier = notifier;
            _teeyootMessagingService = teeyootMessagingService;
            Services                = services;
            _costService            = costService;
            Logger                  = NullLogger.Instance;
            _priceConversionService = priceConversionService;
            _users                  = users;

            _workContextAccessor = workContextAccessor;
            culture     = _workContextAccessor.GetContext().CurrentCulture.Trim();
            cultureUsed = culture == "en-SG" ? "en-SG" : (culture == "id-ID" ? "id-ID" : "en-MY");
        }
Beispiel #24
0
 public WalletController(IWalletService walletService, ICampaignService campaignService, ITransactionService transactionService, IAccountService accountService)
 {
     _transactionService = transactionService;
     _walletService      = walletService;
     _accountService     = accountService;
     _campaignService    = campaignService;
 }
Beispiel #25
0
 public JobApplicationServiceTest()
 {
     _jobApplicationRepository = Substitute.For <IRepository <JobApplication> >();
     _candidateService         = Substitute.For <ICandidateService>();
     _campaignService          = Substitute.For <ICampaignService>();
     _jobApplicationService    = new JobApplicationService(_jobApplicationRepository, _candidateService, _campaignService);
 }
Beispiel #26
0
 public CampaignController(ICampaignService campaignService,
                           IUserImpersonationService userImpersonationService,
                           IAuthenticationRepository authenticationRepository)
     : base(userImpersonationService, authenticationRepository)
 {
     _campaignService = campaignService;
 }
Beispiel #27
0
 public CommonController(
     IUtilityService utilityService,
     ICampaignService campaignService,
     ICartService cartService,
     IOfferService offerService,
     IAccountService accountService,
     IShippingService shippingService,
     IProductService productService,
     IPriceFormatter priceFormatter,
     IWorkContext workContext,
     ICacheManager cacheManager,
     HttpContextBase httpContext,
     EmailSettings emailSettings,
     StoreInformationSettings storeInformationSettings)
 {
     _utilityService           = utilityService;
     _campaignService          = campaignService;
     _cartService              = cartService;
     _offerService             = offerService;
     _accountService           = accountService;
     _shippingService          = shippingService;
     _productService           = productService;
     _priceFormatter           = priceFormatter;
     _workContext              = workContext;
     _cacheManager             = cacheManager;
     _httpContext              = httpContext;
     _emailSettings            = emailSettings;
     _storeInformationSettings = storeInformationSettings;
 }
Beispiel #28
0
        public void Setup()
        {
            _apiUserService     = new Mock <IApiUserRepository>();
            _campaignRepository = new Mock <ICampaignRepository>();
            _dateTimeWrapper    = new Mock <IDateTime>();

            _fixture = new CampaignService(_apiUserService.Object, _campaignRepository.Object, _dateTimeWrapper.Object);

            const string apiToken = "qwerty1234";

            _apiUserService.Setup(m => m.GetToken()).Returns(apiToken);

            MpPledgeCampaignSummaryDto dto = new MpPledgeCampaignSummaryDto()
            {
                PledgeCampaignId   = _pledgeCampaignId,
                NoCommitmentCount  = 1100,
                NoCommitmentAmount = 1200000.00M,
                TotalGiven         = 38000000.00M,
                TotalCommitted     = 95000000.00M,
                StartDate          = new DateTime(2015, 11, 15),
                EndDate            = new DateTime(2018, 12, 31),
                NotStartedCount    = 1800,
                BehindCount        = 3200,
                OnPaceCount        = 1400,
                AheadCount         = 500,
                CompletedCount     = 390,
                TotalCount         = 1800 + 3200 + 1400 + 500 + 390
            };

            _campaignRepository.Setup(m => m.GetPledgeCampaignSummary(apiToken, dto.PledgeCampaignId)).Returns(dto);
        }
        public AdminUserController(
            IRepository <RoleRecord> roleRepository,
            IOrderService orderService,
            ICampaignService campaignService,
            IRepository <CurrencyRecord> currencyRepository,
            IMembershipService membershipService,
            ShellSettings shellSettings,
            IOrchardServices services,
            IUserService userService,
            ISiteService siteService,
            IShapeFactory shapeFactory,
            IRepository <UserRolesPartRecord> userrolrepository)
        {
            _roleRepository     = roleRepository;
            _orderService       = orderService;
            _campaignService    = campaignService;
            _currencyRepository = currencyRepository;
            _membershipService  = membershipService;
            _shellSettings      = shellSettings;
            Services            = services;
            _siteService        = siteService;
            _userService        = userService;

            T     = NullLocalizer.Instance;
            Shape = shapeFactory;
            _userrolrepository = userrolrepository;
        }
Beispiel #30
0
 public EventService(ISecurityService securityService, IUnitOfWork unitOfWork, ICampaignService campaignService, IGroupService groupService)
 {
     _securityService = securityService;
     _unitOfWork = unitOfWork;
     _campaignService = campaignService;
     _groupService = groupService;
 }
 /// <summary>
 /// Creating constructor for campaigns controller for accessing
 /// </summary>
 /// <param name="campaignService">campaignService </param>
 /// <param name="advancedSearchService">advancedSearchService</param>
 /// <param name="tagService">tagService</param>
 public CampaignsController(ICampaignService campaignService, IAdvancedSearchService advancedSearchService, ITagService tagService, IAccountService accountService)
 {
     this.campaignService       = campaignService;
     this.advancedSearchService = advancedSearchService;
     this.tagService            = tagService;
     this.accountService        = accountService;
 }
Beispiel #32
0
 public ClientsController(IClientGroupService cgS, IEndPlayerClientService epcS, IClientScheduleService csS, ICampaignService cS)
 {
     clientGroupService     = cgS;
     endPlayerClientService = epcS;
     clientScheduleService  = csS;
     campaignService        = cS;
 }
Beispiel #33
0
        public AdminUserController(
            IRepository<RoleRecord> roleRepository,
            IOrderService orderService,
            ICampaignService campaignService,
            IRepository<CurrencyRecord> currencyRepository,
            IMembershipService membershipService,
            ShellSettings shellSettings,
            IOrchardServices services,
            IUserService userService,
            ISiteService siteService,
            IShapeFactory shapeFactory)
        {
            _roleRepository = roleRepository;
            _orderService = orderService;
            _campaignService = campaignService;
            _currencyRepository = currencyRepository;
            _membershipService = membershipService;
            _shellSettings = shellSettings;
            Services = services;
            _siteService = siteService;
            _userService = userService;

            T = NullLocalizer.Instance;
            Shape = shapeFactory;
        }
 public CampaignController(EmailAccountSettings emailAccountSettings,
                           ICampaignModelFactory campaignModelFactory,
                           ICampaignService campaignService,
                           ICustomerActivityService customerActivityService,
                           IDateTimeHelper dateTimeHelper,
                           IEmailAccountService emailAccountService,
                           ILocalizationService localizationService,
                           INotificationService notificationService,
                           INewsLetterSubscriptionService newsLetterSubscriptionService,
                           IPermissionService permissionService,
                           IStoreContext storeContext,
                           IStoreService storeService)
 {
     _emailAccountSettings          = emailAccountSettings;
     _campaignModelFactory          = campaignModelFactory;
     _campaignService               = campaignService;
     _customerActivityService       = customerActivityService;
     _dateTimeHelper                = dateTimeHelper;
     _emailAccountService           = emailAccountService;
     _localizationService           = localizationService;
     _notificationService           = notificationService;
     _newsLetterSubscriptionService = newsLetterSubscriptionService;
     _permissionService             = permissionService;
     _storeContext = storeContext;
     _storeService = storeService;
 }
Beispiel #35
0
        // GET: Home

        public HomeController(
            IRepository <CurrencyRecord> currencyRepository,
            IRepository <OrderStatusRecord> orderStatusRepository,
            IOrderService orderService,
            ICampaignService campaignService,
            IShapeFactory shapeFactory,
            IContentManager contentManager,
            ISiteService siteService,
            IPayoutService payoutService,
            INotifier notifierService,
            ITeeyootMessagingService teeyootMessagingService,
            IWorkContextAccessor workContextAccessor,
            IExportExcelService exportexcelservice,
            IRepository <ProductColorRecord> Colors,
            IRepository <ProductSizeRecord> Sizes,
            IPriceConversionService priceConversationService
            )
        {
            _currencyRepository      = currencyRepository;
            _orderStatusRepository   = orderStatusRepository;
            _orderService            = orderService;
            _campaignService         = campaignService;
            _contentManager          = contentManager;
            _siteService             = siteService;
            _payoutService           = payoutService;
            _notifierService         = notifierService;
            _teeyootMessagingService = teeyootMessagingService;
            Shape = shapeFactory;
            _exportexcelservice = exportexcelservice;
            T = NullLocalizer.Instance;
            _workContextAccessor = workContextAccessor;
            _sizes  = Sizes;
            _colors = Colors;
            _priceConversationService = priceConversationService;
        }
        public CampaignServiceTests()
        {
            var mapper = MapperHelper.CreateAutoMapper();

            _campaignClientMock             = new Mock <ICampaignClient>();
            _campaignCompletionServiceMock  = new Mock <ICampaignCompletionService>();
            _conditionCompletionServiceMock = new Mock <IConditionCompletionService>();
            _bonusOperationServiceMock      = new Mock <IBonusOperationService>();
            _bonusCalculatorServiceMock     = new Mock <IBonusCalculatorService>();
            _rabbitParticipatedInCampaignEventPublisherMock = new Mock <IRabbitPublisher <ParticipatedInCampaignEvent> >();
            _activeCampaignRepositoryMock = new Mock <IActiveCampaignRepository>();
            _campaignCacheServiceMock     = new Mock <ICampaignCacheService>();

            _campaignService = new CampaignService(
                _campaignClientMock.Object,
                _campaignCompletionServiceMock.Object,
                _conditionCompletionServiceMock.Object,
                _bonusOperationServiceMock.Object,
                _rabbitParticipatedInCampaignEventPublisherMock.Object,
                _bonusCalculatorServiceMock.Object,
                EmptyLogFactory.Instance,
                _activeCampaignRepositoryMock.Object,
                _campaignCacheServiceMock.Object,
                mapper);
        }
Beispiel #37
0
 public AppService(IProductService productService, ICampaignService campaignService, ITimerService timerService, IAppTimeService appTimeService)
 {
     _productService  = productService;
     _campaignService = campaignService;
     _timerService    = timerService;
     _appTimeService  = appTimeService;
 }
Beispiel #38
0
 public TripService(IEventParticipantService eventParticipant,
                    IDonationService donationService,
                    IGroupService groupService,
                    IFormSubmissionService formSubmissionService,
                    MinistryPlatform.Translation.Services.Interfaces.IEventService eventService,
                    IDonorService donorService,
                    IPledgeService pledgeService,
                    ICampaignService campaignService,
                    IPrivateInviteService privateInviteService,
                    ICommunicationService communicationService,
                    IContactService contactService,
                    IContactRelationshipService contactRelationshipService,
                    IConfigurationWrapper configurationWrapper,
                    IPersonService personService,
                    IServeService serveService,
                    IDestinationService destinationService)
 {
     _eventParticipantService = eventParticipant;
     _donationService = donationService;
     _groupService = groupService;
     _formSubmissionService = formSubmissionService;
     _mpEventService = eventService;
     _mpDonorService = donorService;
     _mpPledgeService = pledgeService;
     _campaignService = campaignService;
     _privateInviteService = privateInviteService;
     _communicationService = communicationService;
     _contactService = contactService;
     _contactRelationshipService = contactRelationshipService;
     _configurationWrapper = configurationWrapper;
     _personService = personService;
     _serveService = serveService;
     _destinationService = destinationService;
 }
 public CampaignController(ISecurityService securityService, ICampaignService campaignService, IEventService eventService, IMessageService messageService)
     : base(securityService)
 {
     _securityService = securityService;
     _campaignService = campaignService;
     _eventService = eventService;
     _messageService = messageService;
 }
 public AdminSearchController(IOrchardServices services, ICampaignService campService, ICampaignCategoriesService campCategService, ISiteService siteService, IShapeFactory shapeFactory)
 {
     Services = services;
     _campService = campService;
     _campCategService = campCategService;
     _siteService = siteService;
     Shape = shapeFactory;
 }
Beispiel #41
0
 public MessageService(IUnitOfWork unitOfWork, ISecurityService securityService, IEventService eventService, IGroupService groupService, ICampaignService campaignService)
 {
     _unitOfWork = unitOfWork;
     _securityService = securityService;
     _eventService = eventService;
     _groupService = groupService;
     _campaignService = campaignService;
 }
Beispiel #42
0
 public StoreService(IRepository<StoreRecord> storeRepository,
                     IRepository<LinkStoreCampaignRecord> linkStoreCampaignRepository,
                     ICampaignService campaignService)
 {
     _storeRepository = storeRepository;
     _linkStoreCampaignRepository = linkStoreCampaignRepository;
     _campaignService = campaignService;
 }
Beispiel #43
0
 public ViewDataHelper(
     IMembershipService membershipService,
     IContactService contactService,
     ICampaignService campaignService)
 {
     _membershipService = membershipService;
     _contactService = contactService;
     _campaignService = campaignService;
 }
        public CampaignController(ICampaignService campaignService, IExternalServicesSettings settings)
        {
            Check.If(campaignService).IsNotNull();
            Check.If(settings).IsNotNull();

            _campaignService = campaignService;

            Analytics.Initialize(settings.SegmentWriteKey);
        }
 public CampaignController(ICampaignService campaignService, IMessagingService messagingService, ICalendarService calendarService, 
     IProductRepository productRepository, IConfigurationService configurationService, ICanSave saver)
 {
     this.campaignService = campaignService;
     this.messagingService = messagingService;
     this.calendarService = calendarService;
     this.productRepository = productRepository;
     this.configurationService = configurationService;
     this.saver = saver;
 }
 public CampaignController(IMailingListService mailingListService, ISearchService searchService, 
     ICampaignService campaignService, IMemberSearchFilterService memberSearchFilterService,
     IMemberService memberService)
 {
     _mailingListService = mailingListService;
     _searchService = searchService;
     _campaignService = campaignService;
     _memberSearchFilterService = memberSearchFilterService;
     _memberService = memberService;
 }
Beispiel #47
0
        public DashboardController(IRepository<CampaignCategoriesRecord> campaignCategoryRepository,
                                   IRepository<LinkCampaignAndCategoriesRecord> linkCampaignAndCategoryRepository,
                                   ICampaignService campaignService,
                                   IMailChimpSettingsService settingsService,
                                   IOrderService orderService,
                                   IWorkContextAccessor wca,
                                   IStoreService storeService,
                                   IimageHelper imageHelper,
                                   IMembershipService membershipService,
                                   IPayoutService payoutService,
                                   IOrchardServices services,
                                   IContentManager contentManager,
                                   IPromotionService promotionService,
                                   IPaymentInformationService paymentInfService,
                                   ICampaignCategoriesService campaignCategoryService,
                                   IRepository<CurrencyRecord> currencyRepository,
                                   IMessageService messageService,
                                   ITShirtCostService tshirtService,
                                   IProductService productService,
                                   INotifier notifier,
                                   ICookieCultureService cookieCultureService,
                                   ITeeyootMessagingService teeyootMessagingService,
                                   IWorkContextAccessor workContextAccessor
                                    )
        {
            _campaignCategoryRepository = campaignCategoryRepository;
            _linkCampaignAndCategoryRepository = linkCampaignAndCategoryRepository;
            _cookieCultureService = cookieCultureService;
            _campaignService = campaignService;
            _currencyRepository = currencyRepository;
            _orderService = orderService;
            _wca = wca;
            this._settingsService = settingsService;
            this._orderService = orderService;
            _storeService = storeService;
            _imageHelper = imageHelper;
            _membershipService = membershipService;
            _contentManager = contentManager;
            _payoutService = payoutService;
            _promotionService = promotionService;
            _campaignCategoryService = campaignCategoryService;
            _paymentInfService = paymentInfService;
            _messageService = messageService;
            _tshirtService = tshirtService;
            _productService = productService;
            _notifier = notifier;
            _teeyootMessagingService = teeyootMessagingService;
            Services = services;

            Logger = NullLogger.Instance;

            _workContextAccessor = workContextAccessor;
            culture = _workContextAccessor.GetContext().CurrentCulture.Trim();
            cultureUsed = culture == "en-SG" ? "en-SG" : (culture == "id-ID" ? "id-ID" : "en-MY");
        }
 public PotentialController(IPotentialService potentialService, IGroupService groupService, IUserService userService,
     ICampaignService campaignService, IAccountService accountService, IInvoiceService invoiceService, IQuoteService quoteService)
 {
     this.potentialService = potentialService;
     this.groupService = groupService;
     this.userService = userService;
     this.campaignService = campaignService;
     this.accountService = accountService;
     this.invoiceService = invoiceService;
     this.quoteService = quoteService;
 }
Beispiel #49
0
 public SearchController(
     ICampaignService campService,
     ICampaignCategoriesService campCategService,
     ICampaignProductService campProductService,
     IWorkContextAccessor workContextAccessor)
 {
     _campService = campService;
     _campCategService = campCategService;
     _campProductService = campProductService;
     _workContextAccessor = workContextAccessor;
 }
        public AdminRelaunchCampController(IRepository<BringBackCampaignRecord> backCampaignRepository,IContentManager contentManager, IRepository<UserPartRecord> userRepository, IRepository<CampaignRecord> campaignRepository, ICampaignService campaignService, IOrchardServices services, IWorkContextAccessor workContextAccessor)
        {
            _backCampaignRepository = backCampaignRepository;
            _campaignRepository = campaignRepository;
            _campaignService = campaignService;
            _userRepository = userRepository;
            _contentManager = contentManager;
            Services = services;

            _workContextAccessor = workContextAccessor;
        }
 public CampaignController(
     IMailingListService mailingListService,
     ISearchService searchService,
     ICampaignService campaignService,
     IMemberSearchFilterService memberSearchFilterService,
     IMemberService memberService)
 {
     this.mailingListService = mailingListService;
     this.searchService = searchService;
     this.campaignService = campaignService;
     this.memberSearchFilterService = memberSearchFilterService;
     this.memberService = memberService;
 }
Beispiel #52
0
        public HomeController(
            IOrderService orderService,
            ICampaignService campaignService,
            INotifier notifier,
            IPromotionService promotionService,
            IimageHelper imageHelper,
            IPaymentSettingsService paymentSettingsService,
            IShapeFactory shapeFactory,
            ITeeyootMessagingService teeyootMessagingService,
            IWorkContextAccessor workContextAccessor,
            IRepository<UserRolesPartRecord> userRolesPartRepository,
            IRepository<TeeyootUserPartRecord> userRepository,
            IPayoutService payoutService,
            IRepository<CommonSettingsRecord> commonSettingsRepository,
            IRepository<CheckoutCampaignRequest> checkoutRequestRepository,
            ICookieCultureService cookieCultureService,
            IRepository<OrderStatusRecord> orderStatusRepository,
            ICountryService countryService,
            IRepository<CountryRecord> countryRepository,
            IRepository<DeliverySettingRecord> deliverySettingRepository,
            IRepository<DeliveryInternationalSettingRecord> deliveryInternationalSettingRepository,
            IRepository<CurrencyExchangeRecord> currencyExchangeRepository)
        {
            _orderService = orderService;
            _promotionService = promotionService;
            _campaignService = campaignService;
            _imageHelper = imageHelper;
            _userRolesPartRepository = userRolesPartRepository;
            _payoutService = payoutService;
            _teeyootMessagingService = teeyootMessagingService;
            _paymentSettingsService = paymentSettingsService;
            _commonSettingsRepository = commonSettingsRepository;
            _checkoutRequestRepository = checkoutRequestRepository;
            _userRepository = userRepository;
            _orderStatusRepository = orderStatusRepository;
            _countryRepository = countryRepository;
            _deliverySettingRepository = deliverySettingRepository;
            _deliveryInternationalSettingRepository = deliveryInternationalSettingRepository;
            _currencyExchangeRepository = currencyExchangeRepository;

            Logger = NullLogger.Instance;
            _notifier = notifier;
            T = NullLocalizer.Instance;
            Shape = shapeFactory;

            //var culture = _workContextAccessor.GetContext().CurrentCulture.Trim();
            _cultureUsed = workContextAccessor.GetContext().CurrentCulture.Trim();
            //culture == "en-SG" ? "en-SG" : (culture == "id-ID" ? "id-ID" : "en-MY");
            _cookieCultureService = cookieCultureService;
            _countryService = countryService;
        }
        public AdminExportPrintsController(ICampaignService campaignService, ISiteService siteService, IShapeFactory shapeFactory, IOrderService orderService, IimageHelper imageHelper, IFontService fontService, IWorkContextAccessor workContextAccessor)
        {
            _campaignService = campaignService;
            _siteService = siteService;
            _imageHelper = imageHelper;
            _orderService = orderService;
            _fontService = fontService;

            Shape = shapeFactory;
            T = NullLocalizer.Instance;
            Logger = NullLogger.Instance;

            _workContextAccessor = workContextAccessor;
        }
Beispiel #54
0
 public MandrillService(IRepository<MailChimpSettingsPartRecord> mailChimpSettingsRepository, IContentManager contentManager,ICampaignService campaignService,
     IMailChimpSettingsService settingsService,
     IMessageService messageService,
      INotifier notifier,
     IOrderService orderService)
 {
     _mailChimpSettingsRepository = mailChimpSettingsRepository;
     _contentManager = contentManager;
     _messageService = messageService;
     _campaignService = campaignService;
     _settingsService = settingsService;
     _notifier = notifier;
     _orderService = orderService;
 }
        public DonationController(IDonationsService donationsService, ICampaignService campaignService)
        {
            if (donationsService == null)
            {
                throw new ArgumentNullException("donationsService");
            }

            if (campaignService == null)
            {
                throw new ArgumentNullException("campaignService");
            }

            this.donationsService = donationsService;
            this.campaignService = campaignService;
        }
 public CampaignController(ICampaignService campaignService,
     IDateTimeHelper dateTimeHelper, IEmailAccountService emailAccountService,
     EmailAccountSettings emailAccountSettings,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     ILocalizationService localizationService, IMessageTokenProvider messageTokenProvider,
     IPermissionService permissionService)
 {
     this._campaignService = campaignService;
     this._dateTimeHelper = dateTimeHelper;
     this._emailAccountService = emailAccountService;
     this._emailAccountSettings = emailAccountSettings;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._localizationService = localizationService;
     this._messageTokenProvider = messageTokenProvider;
     this._permissionService = permissionService;
 }
        // GET: Tranzaction

        public TranzactionController(IPayoutService payoutService,
                                     ISiteService siteService,
                                     IShapeFactory shapeFactory,
                                     IContentManager contentManager,
                                     IPaymentInformationService paymentInformationService,
                                     ITeeyootMessagingService teeyootMessagingService,
                                     ICampaignService campService)
        {
            _payoutService = payoutService;
            _siteService = siteService;
            _paymentInformationService = paymentInformationService;
            _contentManager = contentManager;
            _teeyootMessagingService = teeyootMessagingService;
            Shape = shapeFactory;
            _campService = campService;
        }
        public SendShippedOrderAfter3DayToBuyerTaskHandler(IScheduledTaskManager taskManager, ICampaignService campaignService, ITeeyootMessagingService teeyootMessagingService)
        {
            _taskManager = taskManager;
            _teeyootMessagingService = teeyootMessagingService;

            Logger = NullLogger.Instance;

            try
            {
                var firstDate = DateTime.Today.Date.AddDays(1).AddMinutes(1);
                firstDate = TimeZoneInfo.ConvertTimeToUtc(firstDate, TimeZoneInfo.Local);
                ScheduleNextTask(firstDate);
            }
            catch (Exception e)
            {
                this.Logger.Error(e, e.Message);
            }
        }
        public CheckExpiredCampaignsTaskHandler(IScheduledTaskManager taskManager, ICampaignService campaignService)
        {
            _taskManager = taskManager;
            _campaignService = campaignService;

            Logger = NullLogger.Instance;

            try
            {
                var firstDate = DateTime.Today.Date.AddDays(1).AddMinutes(1);
                firstDate = TimeZoneInfo.ConvertTimeToUtc(firstDate, TimeZoneInfo.Local);
                ScheduleNextTask(firstDate);
            }
            catch (Exception e)
            {
                this.Logger.Error(e, e.Message);
            }
        }
        public AdminMessageContentController(IMessageService messageService, ISiteService siteService, IShapeFactory shapeFactory, INotifier notifier,
            ICampaignService campaignService,
            IMailChimpSettingsService settingsService,
            IOrderService orderService,
            IWorkContextAccessor wca,
            ITeeyootMessagingService teeyootMessagingService
            )
        {
            _messageService = messageService;
            _siteService = siteService;
            _notifier = notifier;
            _campaignService = campaignService;
            _settingsService = settingsService;
            _orderService = orderService;
            _wca = wca;
            _teeyootMessagingService = teeyootMessagingService;

            Shape = shapeFactory;
        }