コード例 #1
0
ファイル: CampaignController.cs プロジェクト: omidam81/Ver1.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;
        }
コード例 #2
0
 private CommandManager GetManager()
 {
     productService  = new ProductService();
     orderService    = new OrderService();
     campaignService = new CampaignService(orderService);
     return(new CommandManager(productService, campaignService, orderService));
 }
コード例 #3
0
ファイル: ReportsController.cs プロジェクト: sahvishal/matrix
 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;
 }
コード例 #4
0
 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;
 }
コード例 #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ı ***");
 }
コード例 #6
0
ファイル: ShoppingCartService.cs プロジェクト: erbaserdem/tya
 public ShoppingCartService(IProductService productService, IDeliveryCostCalculatorService deliveryCostCalculatorService, ICampaignService campaignService)
 {
     ProductService = productService;
     DeliveryCostCalculatorService = deliveryCostCalculatorService;
     CampaignService = campaignService;
     cart            = new Models.ShoppingCart();
 }
コード例 #7
0
 public ScenarioApplierTests()
 {
     _productService  = new ProductService();
     _campaignService = new CampaignService(_productService);
     _orderService    = new OrderService(_productService, _campaignService);
     _scenarioApplier = new ScenarioApplier(_productService, _orderService, _campaignService);
 }
コード例 #8
0
 public MarketingController(ICampaignService campaignService, IGroupService groupService, IUserService userService, IProductService productService)
 {
     this.campaignService = campaignService;
     this.groupService = groupService;
     this.userService = userService;
     this.productService = productService;
 }
コード例 #9
0
        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);
        }
コード例 #10
0
ファイル: CampaignModule.cs プロジェクト: chihsien/Learning
        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;
        }
コード例 #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;
        }
コード例 #12
0
 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();
 }
コード例 #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;
 }
コード例 #14
0
ファイル: LeadController.cs プロジェクト: deboe2015/crumb-crm
 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;
 }
コード例 #15
0
ファイル: HomeController.cs プロジェクト: omidam81/Ver1.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;
        }
コード例 #16
0
 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;
 }
コード例 #17
0
 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;
 }
コード例 #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();
        }
コード例 #19
0
 public EventService(ISecurityService securityService, IUnitOfWork unitOfWork, ICampaignService campaignService, IGroupService groupService)
 {
     _securityService = securityService;
     _unitOfWork      = unitOfWork;
     _campaignService = campaignService;
     _groupService    = groupService;
 }
コード例 #20
0
 public CampaignController(IOrderService orderService, ICampaignService campaignService, IProductService productService, ITimeService timeService)
 {
     _orderService    = orderService;
     _campaignService = campaignService;
     _productService  = productService;
     _timeService     = timeService;
 }
コード例 #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;
        }
コード例 #22
0
 public HomeController(ILocationService locationService, ISpecialityService specialityService, IDoctorProfileService doctorService, ICampaignService campaignService)
 {
     _locationService   = locationService;
     _specialityService = specialityService;
     _doctorService     = doctorService;
     _campaignService   = campaignService;
 }
コード例 #23
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,
                                   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");
        }
コード例 #24
0
 public WalletController(IWalletService walletService, ICampaignService campaignService, ITransactionService transactionService, IAccountService accountService)
 {
     _transactionService = transactionService;
     _walletService      = walletService;
     _accountService     = accountService;
     _campaignService    = campaignService;
 }
コード例 #25
0
 public JobApplicationServiceTest()
 {
     _jobApplicationRepository = Substitute.For <IRepository <JobApplication> >();
     _candidateService         = Substitute.For <ICandidateService>();
     _campaignService          = Substitute.For <ICampaignService>();
     _jobApplicationService    = new JobApplicationService(_jobApplicationRepository, _candidateService, _campaignService);
 }
コード例 #26
0
 public CampaignController(ICampaignService campaignService,
                           IUserImpersonationService userImpersonationService,
                           IAuthenticationRepository authenticationRepository)
     : base(userImpersonationService, authenticationRepository)
 {
     _campaignService = campaignService;
 }
コード例 #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;
 }
コード例 #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);
        }
コード例 #29
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,
            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;
        }
コード例 #30
0
ファイル: EventService.cs プロジェクト: JudasHerb/MyCommunity
 public EventService(ISecurityService securityService, IUnitOfWork unitOfWork, ICampaignService campaignService, IGroupService groupService)
 {
     _securityService = securityService;
     _unitOfWork = unitOfWork;
     _campaignService = campaignService;
     _groupService = groupService;
 }
コード例 #31
0
 /// <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;
 }
コード例 #32
0
ファイル: ClientsController.cs プロジェクト: jdi4/Cypisek
 public ClientsController(IClientGroupService cgS, IEndPlayerClientService epcS, IClientScheduleService csS, ICampaignService cS)
 {
     clientGroupService     = cgS;
     endPlayerClientService = epcS;
     clientScheduleService  = csS;
     campaignService        = cS;
 }
コード例 #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;
        }
コード例 #34
0
 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;
 }
コード例 #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;
        }
コード例 #36
0
        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);
        }
コード例 #37
0
 public AppService(IProductService productService, ICampaignService campaignService, ITimerService timerService, IAppTimeService appTimeService)
 {
     _productService  = productService;
     _campaignService = campaignService;
     _timerService    = timerService;
     _appTimeService  = appTimeService;
 }
コード例 #38
0
ファイル: TripService.cs プロジェクト: plachmann/crds-angular
 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;
 }
コード例 #39
0
 public CampaignController(ISecurityService securityService, ICampaignService campaignService, IEventService eventService, IMessageService messageService)
     : base(securityService)
 {
     _securityService = securityService;
     _campaignService = campaignService;
     _eventService = eventService;
     _messageService = messageService;
 }
コード例 #40
0
 public AdminSearchController(IOrchardServices services, ICampaignService campService, ICampaignCategoriesService campCategService, ISiteService siteService, IShapeFactory shapeFactory)
 {
     Services = services;
     _campService = campService;
     _campCategService = campCategService;
     _siteService = siteService;
     Shape = shapeFactory;
 }
コード例 #41
0
 public MessageService(IUnitOfWork unitOfWork, ISecurityService securityService, IEventService eventService, IGroupService groupService, ICampaignService campaignService)
 {
     _unitOfWork = unitOfWork;
     _securityService = securityService;
     _eventService = eventService;
     _groupService = groupService;
     _campaignService = campaignService;
 }
コード例 #42
0
ファイル: StoreService.cs プロジェクト: omidam81/Ver1.0
 public StoreService(IRepository<StoreRecord> storeRepository,
                     IRepository<LinkStoreCampaignRecord> linkStoreCampaignRepository,
                     ICampaignService campaignService)
 {
     _storeRepository = storeRepository;
     _linkStoreCampaignRepository = linkStoreCampaignRepository;
     _campaignService = campaignService;
 }
コード例 #43
0
ファイル: ViewInitHelper.cs プロジェクト: deboe2015/crumb-crm
 public ViewDataHelper(
     IMembershipService membershipService,
     IContactService contactService,
     ICampaignService campaignService)
 {
     _membershipService = membershipService;
     _contactService = contactService;
     _campaignService = campaignService;
 }
コード例 #44
0
        public CampaignController(ICampaignService campaignService, IExternalServicesSettings settings)
        {
            Check.If(campaignService).IsNotNull();
            Check.If(settings).IsNotNull();

            _campaignService = campaignService;

            Analytics.Initialize(settings.SegmentWriteKey);
        }
コード例 #45
0
 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;
 }
コード例 #46
0
 public CampaignController(IMailingListService mailingListService, ISearchService searchService, 
     ICampaignService campaignService, IMemberSearchFilterService memberSearchFilterService,
     IMemberService memberService)
 {
     _mailingListService = mailingListService;
     _searchService = searchService;
     _campaignService = campaignService;
     _memberSearchFilterService = memberSearchFilterService;
     _memberService = memberService;
 }
コード例 #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");
        }
コード例 #48
0
 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;
 }
コード例 #49
0
ファイル: SearchController.cs プロジェクト: omidam81/Ver1.0
 public SearchController(
     ICampaignService campService,
     ICampaignCategoriesService campCategService,
     ICampaignProductService campProductService,
     IWorkContextAccessor workContextAccessor)
 {
     _campService = campService;
     _campCategService = campCategService;
     _campProductService = campProductService;
     _workContextAccessor = workContextAccessor;
 }
コード例 #50
0
        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;
        }
コード例 #51
0
 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;
 }
コード例 #52
0
ファイル: HomeController.cs プロジェクト: omidam81/Ver1.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;
        }
コード例 #53
0
        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;
        }
コード例 #54
0
ファイル: MandrillService.cs プロジェクト: omidam81/Ver1.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;
 }
コード例 #55
0
        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;
        }
コード例 #56
0
 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;
 }
コード例 #57
0
        // 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;
        }
コード例 #58
0
        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);
            }
        }
コード例 #59
0
        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);
            }
        }
コード例 #60
0
        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;
        }