public ManufacturerController(ICategoryService categoryService, IManufacturerService manufacturerService,
            IManufacturerTemplateService manufacturerTemplateService, IProductService productService,
			IStoreService storeService,	IStoreMappingService storeMappingService,
            IUrlRecordService urlRecordService, IPictureService pictureService,
            ILanguageService languageService, ILocalizationService localizationService, ILocalizedEntityService localizedEntityService,
            IWorkContext workContext,
            ICustomerActivityService customerActivityService, IPermissionService permissionService,
			IDateTimeHelper dateTimeHelper,
            AdminAreaSettings adminAreaSettings,
			CatalogSettings catalogSettings)
        {
            this._categoryService = categoryService;
            this._manufacturerTemplateService = manufacturerTemplateService;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._storeService = storeService;
            this._storeMappingService = storeMappingService;
            this._urlRecordService = urlRecordService;
            this._pictureService = pictureService;
            this._languageService = languageService;
            this._localizationService = localizationService;
            this._localizedEntityService = localizedEntityService;
            this._workContext = workContext;
            this._customerActivityService = customerActivityService;
            this._permissionService = permissionService;
            this._dateTimeHelper = dateTimeHelper;
            this._adminAreaSettings = adminAreaSettings;
            this._catalogSettings = catalogSettings;
        }
 public RobotsTxtManager(
     ISettingService settingService,
     ILocalizationService localizationService,
     LocalizationSettings localizationSettings,
     IStoreContext storeContext,
     ILanguageService languageService,
     IBlogService blogService,
     INewsService newsService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     ITopicService topicService,
     IVendorService vendorService,
     IProductService productService)
 {
     _settingService = settingService;
     _localizationService = localizationService;
     _localizationSettings = localizationSettings;
     _storeContext = storeContext;
     _languageService = languageService;
     _blogService = blogService;
     _newsService = newsService;
     _categoryService = categoryService;
     _manufacturerService = manufacturerService;
     _topicService = topicService;
     _vendorService = vendorService;
     _productService = productService;
     _storeId = _storeContext.CurrentStore.Id;
     _languages = _languageService.GetAllLanguages(storeId: _storeId);
 }
示例#3
0
 public FroogleService(IScheduleTaskService scheduleTaskService,
     IGoogleService googleService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     IWebHelper webHelper,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     StoreInformationSettings storeInformationSettings,
     FroogleSettings froogleSettings,
     CurrencySettings currencySettings,
     GoogleProductObjectContext objectContext)
 {
     this._scheduleTaskService = scheduleTaskService;
     this._googleService = googleService;
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._currencyService = currencyService;
     this._webHelper = webHelper;
     this._settingService = settingService;
     this._workContext = workContext;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._froogleSettings = froogleSettings;
     this._currencySettings = currencySettings;
     this._objectContext = objectContext;
 }
示例#4
0
        //private readonly GoogleProductObjectContext _objectContext;

        #endregion

        #region Ctor
        public FroogleService(IGoogleService googleService,
            IPriceCalculationService priceCalculationService,
            ITaxService taxService, 
            IProductService productService,
            ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IPictureService pictureService,
            ICurrencyService currencyService,
            ILanguageService languageService,
            ISettingService settingService,
            IWorkContext workContext,
            IMeasureService measureService,
            MeasureSettings measureSettings,
            FroogleSettings froogleSettings,
            CurrencySettings currencySettings)
        {
            this._googleService = googleService;
            this._priceCalculationService = priceCalculationService;
            this._taxService = taxService;
            this._productService = productService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._pictureService = pictureService;
            this._currencyService = currencyService;
            this._languageService = languageService;
            this._settingService = settingService;
            this._workContext = workContext;
            this._measureService = measureService;
            this._measureSettings = measureSettings;
            this._froogleSettings = froogleSettings;
            this._currencySettings = currencySettings;
            //this._objectContext = objectContext;
        }
 public CopyProductService(IProductService productService,
     IProductAttributeService productAttributeService,
     ILanguageService languageService,
     ILocalizedEntityService localizedEntityService, 
     IPictureService pictureService,
     ICategoryService categoryService, 
     IManufacturerService manufacturerService,
     ISpecificationAttributeService specificationAttributeService,
     IDownloadService downloadService,
     IProductAttributeParser productAttributeParser,
     IUrlRecordService urlRecordService, 
     IStoreMappingService storeMappingService)
 {
     this._productService = productService;
     this._productAttributeService = productAttributeService;
     this._languageService = languageService;
     this._localizedEntityService = localizedEntityService;
     this._pictureService = pictureService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._specificationAttributeService = specificationAttributeService;
     this._downloadService = downloadService;
     this._productAttributeParser = productAttributeParser;
     this._urlRecordService = urlRecordService;
     this._storeMappingService = storeMappingService;
 }
 public BackwardCompatibility2XController(IProductService productService,
     ICategoryService categoryService, IManufacturerService manufacturerService)
 {
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
 }
示例#7
0
 public ProductController(IProductService productService, 
     IProductTemplateService productTemplateService,
     ICategoryService categoryService, IManufacturerService manufacturerService,
     IWorkContext workContext, ILanguageService languageService, 
     ILocalizationService localizationService, ILocalizedEntityService localizedEntityService,
     ISpecificationAttributeService specificationAttributeService, IPictureService pictureService,
     ITaxCategoryService taxCategoryService, IProductTagService productTagService,
     ICopyProductService copyProductService, IPdfService pdfService,
     IExportManager exportManager, IImportManager importManager,
     ICustomerActivityService customerActivityService,
     IPermissionService permissionService, AdminAreaSettings adminAreaSettings)
 {
     this._productService = productService;
     this._productTemplateService = productTemplateService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._workContext = workContext;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._specificationAttributeService = specificationAttributeService;
     this._pictureService = pictureService;
     this._taxCategoryService = taxCategoryService;
     this._productTagService = productTagService;
     this._copyProductService = copyProductService;
     this._pdfService = pdfService;
     this._exportManager = exportManager;
     this._importManager = importManager;
     this._customerActivityService = customerActivityService;
     this._permissionService = permissionService;
     this._adminAreaSettings = adminAreaSettings;
 }
示例#8
0
 public DiscountController(IDiscountService discountService, 
     ILocalizationService localizationService,
     ICurrencyService currencyService,
     ICategoryService categoryService,
     IProductService productService,
     IWebHelper webHelper, 
     IDateTimeHelper dateTimeHelper,
     ICustomerActivityService customerActivityService, 
     CurrencySettings currencySettings,
     IPermissionService permissionService,
     IWorkContext workContext,
     IManufacturerService manufacturerService,
     IStoreService storeService,
     IVendorService vendorService,
     IOrderService orderService,
     IPriceFormatter priceFormatter)
 {
     this._discountService = discountService;
     this._localizationService = localizationService;
     this._currencyService = currencyService;
     this._categoryService = categoryService;
     this._productService = productService;
     this._webHelper = webHelper;
     this._dateTimeHelper = dateTimeHelper;
     this._customerActivityService = customerActivityService;
     this._currencySettings = currencySettings;
     this._permissionService = permissionService;
     this._workContext = workContext;
     this._manufacturerService = manufacturerService;
     this._storeService = storeService;
     this._vendorService = vendorService;
     this._orderService = orderService;
     this._priceFormatter = priceFormatter;
 }
示例#9
0
        public ImportManager(
			IProductService productService, 
			ICategoryService categoryService,
            IManufacturerService manufacturerService, 
			IPictureService pictureService,
            IUrlRecordService urlRecordService,
			SeoSettings seoSettings,
			IEventPublisher eventPublisher,
			IRepository<Product> rsProduct,
			IRepository<ProductCategory> rsProductCategory,
			IRepository<ProductManufacturer> rsProductManufacturer,
            IRepository<Picture> rsPicture,
			IRepository<ProductPicture> rsProductPicture,
            IRepository<UrlRecord> rsUrlRecord,
            ILanguageService languageService,
            ILocalizedEntityService localizedEntityService,
            IStoreMappingService storeMappingService)
        {
            this._productService = productService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._pictureService = pictureService;
            this._urlRecordService = urlRecordService;
            this._seoSettings = seoSettings;
            this._eventPublisher = eventPublisher;
            this._rsProduct = rsProduct;
            this._rsProductCategory = rsProductCategory;
            this._rsProductManufacturer = rsProductManufacturer;
            this._rsProductPicture = rsProductPicture;
            this._rsUrlRecord = rsUrlRecord;
            this._rsPicture = rsPicture;
            this._languageService = languageService;
            this._localizedEntityService = localizedEntityService;
            this._storeMappingService = storeMappingService;
        }
示例#10
0
        public GoogleFeedService(
			IRepository<GoogleProductRecord> gpRepository,
			IProductService productService,
			IManufacturerService manufacturerService,
			FroogleSettings settings,
			IMeasureService measureService,
			MeasureSettings measureSettings,
			IDbContext dbContext,
			AdminAreaSettings adminAreaSettings,
			ICurrencyService currencyService,
			ICommonServices services,
			IComponentContext ctx)
        {
            _gpRepository = gpRepository;
            _productService = productService;
            _manufacturerService = manufacturerService;
            Settings = settings;
            _measureService = measureService;
            _measureSettings = measureSettings;
            _dbContext = dbContext;
            _adminAreaSettings = adminAreaSettings;
            _currencyService = currencyService;
            _services = services;

            _helper = new FeedPluginHelper(ctx, "SmartStore.GoogleMerchantCenter", "SmartStore.GoogleMerchantCenter", () =>
            {
                return Settings as PromotionFeedSettings;
            });
        }
        public new void SetUp()
        {
            _workContext = null;

            _store = new Store { Id = 1 };
            _storeContext = MockRepository.GenerateMock<IStoreContext>();
            _storeContext.Expect(x => x.CurrentStore).Return(_store);

            _discountService = MockRepository.GenerateMock<IDiscountService>();
            _categoryService = MockRepository.GenerateMock<ICategoryService>();
            _manufacturerService = MockRepository.GenerateMock<IManufacturerService>();
            _productService = MockRepository.GenerateMock<IProductService>();


            _productAttributeParser = MockRepository.GenerateMock<IProductAttributeParser>();

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings = new CatalogSettings();

            _cacheManager = new NopNullCache();

            _priceCalcService = new PriceCalculationService(_workContext,
                _storeContext, 
                _discountService,
                _categoryService,
                _manufacturerService,
                _productAttributeParser,
                _productService,
                _cacheManager,
                _shoppingCartSettings, 
                _catalogSettings);
        }
 public CategoryController(ICategoryService categoryService, ICategoryTemplateService categoryTemplateService,
     IManufacturerService manufacturerService, IProductService productService, 
     ICustomerService customerService,
     IUrlRecordService urlRecordService, IPictureService pictureService, ILanguageService languageService,
     ILocalizationService localizationService, ILocalizedEntityService localizedEntityService,
     IDiscountService discountService, IPermissionService permissionService,
     IAclService aclService,
     IExportManager exportManager, IWorkContext workContext,
     ICustomerActivityService customerActivityService, AdminAreaSettings adminAreaSettings,
     CatalogSettings catalogSettings)
 {
     this._categoryService = categoryService;
     this._categoryTemplateService = categoryTemplateService;
     this._manufacturerService = manufacturerService;
     this._productService = productService;
     this._customerService = customerService;
     this._urlRecordService = urlRecordService;
     this._pictureService = pictureService;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._discountService = discountService;
     this._permissionService = permissionService;
     this._aclService = aclService;
     this._exportManager = exportManager;
     this._workContext = workContext;
     this._customerActivityService = customerActivityService;
     this._adminAreaSettings = adminAreaSettings;
     this._catalogSettings = catalogSettings;
 }
 public ManufacturerController(ICategoryService categoryService, IManufacturerService manufacturerService,
     IManufacturerTemplateService manufacturerTemplateService, IProductService productService,
     ICustomerService customerService, IStoreService storeService,
     IStoreMappingService storeMappingService,
     IUrlRecordService urlRecordService, IPictureService pictureService,
     ILanguageService languageService, ILocalizationService localizationService,
     ILocalizedEntityService localizedEntityService, IExportManager exportManager,
     ICustomerActivityService customerActivityService, IAclService aclService, 
     IPermissionService permissionService,
     AdminAreaSettings adminAreaSettings, CatalogSettings catalogSettings)
 {
     this._categoryService = categoryService;
     this._manufacturerTemplateService = manufacturerTemplateService;
     this._manufacturerService = manufacturerService;
     this._productService = productService;
     this._customerService = customerService;
     this._storeService = storeService;
     this._storeMappingService = storeMappingService;
     this._urlRecordService = urlRecordService;
     this._pictureService = pictureService;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._localizedEntityService = localizedEntityService;
     this._exportManager = exportManager;
     this._customerActivityService = customerActivityService;
     this._aclService = aclService;
     this._permissionService = permissionService;
     this._adminAreaSettings = adminAreaSettings;
     this._catalogSettings = catalogSettings;
 }
		public GoogleService(
			IRepository<GoogleProductRecord> gpRepository,
			IProductService productService,
			IManufacturerService manufacturerService,
			IStoreService storeService,
			ICategoryService categoryService,
			FroogleSettings settings,
			IMeasureService measureService,
			MeasureSettings measureSettings,
			IPriceCalculationService priceCalculationService,
			IWorkContext workContext)
        {
            _gpRepository = gpRepository;
			_productService = productService;
			_manufacturerService = manufacturerService;
			_storeService = storeService;
			_categoryService = categoryService;
			Settings = settings;
			_measureService = measureService;
			_measureSettings = measureSettings;
			_priceCalculationService = priceCalculationService;
			_workContext = workContext;

			_helper = new PluginHelperFeed("PromotionFeed.Froogle", "SmartStore.Plugin.Feed.Froogle", () =>
			{
				return Settings as PromotionFeedSettings;
			});
        }
 public CollectibleExportService(IProductService productService, 
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     IUrlRecordService urlRecordService,
     IStoreContext storeContext,
     INewsLetterSubscriptionService newsLetterSubscriptionService,
     ICountryService countryService,   //not used
     IStateProvinceService stateProvinceService,
     IConsignorService consignorService,
     IAuthenticationService authenticationService,
     ILogger logger,
     IRepository<AUCountryLotRecord> countrylotRepo,
     IRepository<AUStateProvinceLotRecord> stateprovincelotRepo
     )
 {
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._urlRecordService = urlRecordService;
     this._storeContext = storeContext;
     this._newsLetterSubscriptionService = newsLetterSubscriptionService;
     this._countryService = countryService;
     this._stateProvinceService = stateProvinceService;
     this._consignorService = consignorService;
     this._authenticationService = authenticationService;
     this._logger = logger;                          //NJM: AUConsignor
     this._countrylotRepo = countrylotRepo;
     this._stateprovincelotRepo = stateprovincelotRepo;
 }
        //private readonly IStoreContext _storeContext;
        //private readonly IDiscountService _discountService;
        //private readonly ICategoryService _categoryService;
        //private readonly IProductAttributeParser _productAttributeParser;
        //private readonly IProductService _productService;
        //private readonly ICacheManager _cacheManager;
        //private readonly ShoppingCartSettings _shoppingCartSettings;
        //private readonly CatalogSettings _catalogSettings;

        #endregion

        #region constructor

        public PromosPriceCalculationService(
            IPromoUtilities promoUtilities,
            IWorkContext workContext,
            IStoreContext storeContext,
            IDiscountService discountService,
            ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IProductAttributeParser productAttributeParser,
            IProductService productService,
            ICacheManager cacheManager,
            ShoppingCartSettings shoppingCartSettings,
            CatalogSettings catalogSettings,
            PromoSettings promoSettings,
            ICurrencyService currencyService,
            IPriceCalculationService priceCalculationService,
            ILocalizationService localizationService,
            ILogger logger)
            : base (workContext, storeContext, discountService,
                    categoryService, manufacturerService, productAttributeParser,
                    productService, cacheManager, shoppingCartSettings,
                    catalogSettings)
        {
            this._promoUtilities = promoUtilities;
            this._promoSettings = promoSettings;
            this._workContext = workContext;
            this._currencyService = currencyService;
            this._priceCalculationService = priceCalculationService;
            this._localizationService = localizationService;
            this._logger = logger;
        }
示例#17
0
        public ExportManager(ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IProductService productService,
			IProductAttributeService productAttributeService,
            IProductTemplateService productTemplateService,
            IPictureService pictureService,
            INewsLetterSubscriptionService newsLetterSubscriptionService,
            ILanguageService languageService,
			MediaSettings mediaSettings,
			ICommonServices services,
            IStoreMappingService storeMappingService)
        {
            _categoryService = categoryService;
            _manufacturerService = manufacturerService;
            _productService = productService;
			_productAttributeService = productAttributeService;
			_productTemplateService = productTemplateService;
            _pictureService = pictureService;
            _newsLetterSubscriptionService = newsLetterSubscriptionService;
            _languageService = languageService;
			_mediaSettings = mediaSettings;
			_services = services;
            _storeMappingService = storeMappingService;

			Logger = NullLogger.Instance;
        }
        public CustomerRoleController(ICustomerService customerService,
            ILocalizationService localizationService, 
            ICustomerActivityService customerActivityService,
            IPermissionService permissionService,
            IProductService productService,
            ICategoryService categoryService,
            IManufacturerService manufacturerService,
            IStoreService storeService,
            IVendorService vendorService,
            IWorkContext workContext,
            ILanguageService languageService,
            ILocalizedEntityService localizedEntityService,
            ICacheManager cacheManager)
		{
            this._customerService = customerService;
            this._localizationService = localizationService;
            this._customerActivityService = customerActivityService;
            this._permissionService = permissionService;
            this._productService = productService;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._storeService = storeService;
            this._vendorService = vendorService;
            this._workContext = workContext;
            this._languageService = languageService;
            this._localizedEntityService = localizedEntityService;
            this._cacheManager = cacheManager;
        }
 public FroogleService(IGoogleService googleService,
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     FroogleSettings froogleSettings,
     CurrencySettings currencySettings,
     GoogleProductObjectContext objectContext)
 {
     this._googleService = googleService;
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._currencyService = currencyService;
     this._settingService = settingService;
     this._workContext = workContext;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._froogleSettings = froogleSettings;
     this._currencySettings = currencySettings;
     this._objectContext = objectContext;
 }
        public ProductImporter(
			IRepository<ProductPicture> productPictureRepository,
			IRepository<ProductManufacturer> productManufacturerRepository,
			IRepository<ProductCategory> productCategoryRepository,
			IRepository<Product> productRepository,
			ICommonServices services,
			ILocalizedEntityService localizedEntityService,
			IPictureService pictureService,
			IManufacturerService manufacturerService,
			ICategoryService categoryService,
			IProductService productService,
			IProductTemplateService productTemplateService,
			FileDownloadManager fileDownloadManager)
        {
            _productPictureRepository = productPictureRepository;
            _productManufacturerRepository = productManufacturerRepository;
            _productCategoryRepository = productCategoryRepository;
            _productRepository = productRepository;
            _services = services;
            _localizedEntityService = localizedEntityService;
            _pictureService = pictureService;
            _manufacturerService = manufacturerService;
            _categoryService = categoryService;
            _productService = productService;
            _productTemplateService = productTemplateService;
            _fileDownloadManager = fileDownloadManager;
        }
示例#21
0
        public ProductController(
			ICommonServices services,
			IManufacturerService manufacturerService,
			IProductService productService,
			IProductAttributeService productAttributeService,
			IProductAttributeParser productAttributeParser,
			ITaxService taxService,
			ICurrencyService currencyService,
			IPictureService pictureService,
			IPriceCalculationService priceCalculationService, 
			IPriceFormatter priceFormatter,
			ICustomerContentService customerContentService, 
			ICustomerService customerService,
			IShoppingCartService shoppingCartService,
			IRecentlyViewedProductsService recentlyViewedProductsService, 
			IWorkflowMessageService workflowMessageService, 
			IProductTagService productTagService,
			IOrderReportService orderReportService,
			IBackInStockSubscriptionService backInStockSubscriptionService, 
			IAclService aclService,
			IStoreMappingService storeMappingService,
			MediaSettings mediaSettings, 
			CatalogSettings catalogSettings,
			ShoppingCartSettings shoppingCartSettings,
			LocalizationSettings localizationSettings, 
			CaptchaSettings captchaSettings,
			CatalogHelper helper,
            IDownloadService downloadService,
            ILocalizationService localizationService)
        {
            this._services = services;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._customerContentService = customerContentService;
            this._customerService = customerService;
            this._shoppingCartService = shoppingCartService;
            this._recentlyViewedProductsService = recentlyViewedProductsService;
            this._workflowMessageService = workflowMessageService;
            this._productTagService = productTagService;
            this._orderReportService = orderReportService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;
            this._aclService = aclService;
            this._storeMappingService = storeMappingService;
            this._mediaSettings = mediaSettings;
            this._catalogSettings = catalogSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._localizationSettings = localizationSettings;
            this._captchaSettings = captchaSettings;
            this._helper = helper;
            this._downloadService = downloadService;
            this._localizationService = localizationService;
        }
示例#22
0
        public CatalogController(ICategoryService categoryService, 
            IManufacturerService manufacturerService, IProductService productService, 
            IProductTemplateService productTemplateService,
            ICategoryTemplateService categoryTemplateService,
            IManufacturerTemplateService manufacturerTemplateService,
            IProductAttributeService productAttributeService, IProductAttributeParser productAttributeParser, 
            IWorkContext workContext, ITaxService taxService, ICurrencyService currencyService,
            IPictureService pictureService, ILocalizationService localizationService,
            IPriceCalculationService priceCalculationService, IPriceFormatter priceFormatter,
            IWebHelper webHelper, ISpecificationAttributeService specificationAttributeService,
            ICustomerContentService customerContentService, IDateTimeHelper dateTimeHelper,
            IShoppingCartService shoppingCartService,
            IRecentlyViewedProductsService recentlyViewedProductsService, ICompareProductsService compareProductsService,
            IWorkflowMessageService workflowMessageService, IProductTagService productTagService,
            IOrderReportService orderReportService, ICustomerService customerService,
            IBackInStockSubscriptionService backInStockSubscriptionService,
            IPermissionService permissionService,
            MediaSettings mediaSetting, CatalogSettings catalogSettings,
            ShoppingCartSettings shoppingCartSettings, StoreInformationSettings storeInformationSettings,
            LocalizationSettings localizationSettings, CustomerSettings customerSettings, ICacheManager cacheManager)
        {
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._productTemplateService = productTemplateService;
            this._categoryTemplateService = categoryTemplateService;
            this._manufacturerTemplateService = manufacturerTemplateService;
            this._productAttributeService = productAttributeService;
            this._productAttributeParser = productAttributeParser;
            this._workContext = workContext;
            this._taxService = taxService;
            this._currencyService = currencyService;
            this._pictureService = pictureService;
            this._localizationService = localizationService;
            this._priceCalculationService = priceCalculationService;
            this._priceFormatter = priceFormatter;
            this._webHelper = webHelper;
            this._specificationAttributeService = specificationAttributeService;
            this._customerContentService = customerContentService;
            this._dateTimeHelper = dateTimeHelper;
            this._shoppingCartService = shoppingCartService;
            this._recentlyViewedProductsService = recentlyViewedProductsService;
            this._compareProductsService = compareProductsService;
            this._workflowMessageService = workflowMessageService;
            this._productTagService = productTagService;
            this._orderReportService = orderReportService;
            this._customerService = customerService;
            this._backInStockSubscriptionService = backInStockSubscriptionService;
            this._permissionService = permissionService;

            this._mediaSetting = mediaSetting;
            this._catalogSettings = catalogSettings;
            this._shoppingCartSettings = shoppingCartSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._localizationSettings = localizationSettings;
            this._customerSettings = customerSettings;

            this._cacheManager = cacheManager;
        }
示例#23
0
 public ImportManager(IProductService productService, ICategoryService categoryService,
     IManufacturerService manufacturerService, IPictureService pictureService)
 {
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
 }
 public KendoManufacturersController(
    ICategoriesService categoriesService,
     IProductService productsService,
     IManufacturerService manufacturerService)
 {
     this.categoriesService = categoriesService;
     this.productsService = productsService;
     this.manufacturerService = manufacturerService;
 }
 public promoService(
     IProductService productService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IPictureService pictureService,
     ICurrencyService currencyService,
     ISettingService settingService,
     IWorkContext workContext,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     CurrencySettings currencySettings,
     IProductAttributeService productAttributeService,
     IPriceCalculationService priceCalculationService,
     ITaxService taxService,
     ILogger logger,
     IStoreService storeService,
     IPromoUtilities promoUtilities,
     PromoSettings promoSettings,
     IShippingService shippingService,
     IGenericAttributeService genericAttributeService,
     IStoreContext storeContext,
     IProductMappingService productMappingService,
     IShoppingCartService shoppingCartService,
     ICouponService qixolPromosCouponService,
     IAttributeValueService attributeValueService,
     IOrderService orderService,
     ICustomerService customerService,
     ILocalizationService localizationService)
 {
     this._productService = productService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
     this._currencyService = currencyService;
     this._settingService = settingService;
     this._workContext = workContext;
     this._measureService = measureService;
     this._measureSettings = measureSettings;
     this._currencySettings = currencySettings;
     this._productAttributeService = productAttributeService;
     this._priceCalculationService = priceCalculationService;
     this._taxService = taxService;
     this._logger = logger;
     this._promoUtilities = promoUtilities;
     this._storeService = storeService;
     this._shippingService = shippingService;
     this._genericAttributeService = genericAttributeService;
     this._storeContext = storeContext;
     this._productMappingService = productMappingService;
     this._shoppingCartService = shoppingCartService;
     this._couponService = qixolPromosCouponService;
     this._attributeValueService = attributeValueService;
     this._orderService = orderService;
     this._promoSettings = promoSettings;
     this._customerService = customerService;
     this._localizationService = localizationService;
 }
示例#26
0
        public CatalogController(
			ICommonServices services,
			ICategoryService categoryService,
            IManufacturerService manufacturerService, 
			IProductService productService,
            ICategoryTemplateService categoryTemplateService,
            IManufacturerTemplateService manufacturerTemplateService,
			ICurrencyService currencyService,
            Lazy<ICurrencyService> currencyServices,
			IOrderReportService orderReportService,
			IProductTagService productTagService,
			IRecentlyViewedProductsService recentlyViewedProductsService,
            IPictureService pictureService,
            IPriceFormatter priceFormatter,
            ISpecificationAttributeService specificationAttributeService,
			ICompareProductsService compareProductsService,
			IGenericAttributeService genericAttributeService,
            Lazy<IGenericAttributeService> genericAttributeServices,
			IAclService aclService,
			IStoreMappingService storeMappingService,
            MediaSettings mediaSettings, 
			CatalogSettings catalogSettings,
			IFilterService filterService,
 			CatalogHelper helper,
            ForumSettings forumSettings,
            Lazy<IForumService> forumService,
            IOrderTotalCalculationService orderTotalCalculationService,
            CustomerSettings customerSettings)
        {
            this._services = services;
            this._categoryService = categoryService;
            this._manufacturerService = manufacturerService;
            this._productService = productService;
            this._categoryTemplateService = categoryTemplateService;
            this._manufacturerTemplateService = manufacturerTemplateService;
            this._currencyService = currencyService;
            this._currencyServices = currencyServices;
            this._orderReportService = orderReportService;
            this._productTagService = productTagService;
            this._recentlyViewedProductsService = recentlyViewedProductsService;
            this._compareProductsService = compareProductsService;
            this._pictureService = pictureService;
            this._priceFormatter = priceFormatter;
            this._specificationAttributeService = specificationAttributeService;
            this._genericAttributeService = genericAttributeService;
            this._genericAttributeServices = genericAttributeServices;
            this._aclService = aclService;
            this._storeMappingService = storeMappingService;
            this._filterService = filterService;
            this._mediaSettings = mediaSettings;
            this._catalogSettings = catalogSettings;
            this._forumSettings = forumSettings;
            this._helper = helper;
            this._forumservice = forumService;
            this._orderTotalCalculationService = orderTotalCalculationService;
            this._customerSettings = customerSettings;
        }
 public SelectSellController(IProductService productService,
     IProductTemplateService productTemplateService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     ICustomerService customerService,
     IUrlRecordService urlRecordService,
     IWorkContext workContext,
     ILanguageService languageService,
     ILocalizationService localizationService,
     ILocalizedEntityService localizedEntityService,
     ISpecificationAttributeService specificationAttributeService,
     IPictureService pictureService,
     ITaxCategoryService taxCategoryService,
     IProductTagService productTagService,
     ICopyProductService copyProductService,
     IPdfService pdfService,
     IExportManager exportManager,
     IImportManager importManager,
     ICustomerActivityService customerActivityService,
     IPermissionService permissionService,
     IAclService aclService,
     IStoreService storeService,
     IOrderService orderService,
     IStoreMappingService storeMappingService,
     IVendorService vendorService,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ICurrencyService currencyService,
     CurrencySettings currencySettings,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     AdminAreaSettings adminAreaSettings,
     IDateTimeHelper dateTimeHelper,
     IDiscountService discountService,
     IProductAttributeService productAttributeService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IShoppingCartService shoppingCartService,
     IProductAttributeFormatter productAttributeFormatter,
     IProductAttributeParser productAttributeParser,
     IDownloadService downloadService,
     IStoreContext storeContext,
     IRepository<StoreMapping> storeMapping)
 {
     _workContext = workContext;
     _productService = productService;
     _pictureService = pictureService;
     _localizationService = localizationService;
     _categoryService = categoryService;
     _manufacturerService = manufacturerService;
     _storeService = storeService;
     _shippingService = shippingService;
     _vendorService = vendorService;
     _storeMappingService = storeMappingService;
     _storeContext = storeContext;
     _storeMapping = storeMapping;
 }
示例#28
0
 public ImportManager(IProductService productService, ILanguageService languageService,
     ILocalizationService localizationService, ICategoryService categoryService,
     IManufacturerService manufacturerService, IPictureService pictureService)
 {
     this._productService = productService;
     this._languageService = languageService;
     this._localizationService = localizationService;
     this._categoryService = categoryService;
     this._manufacturerService = manufacturerService;
     this._pictureService = pictureService;
 }
        public new void SetUp()
        {
            _categoryService = MockRepository.GenerateMock<ICategoryService>();
            _manufacturerService = MockRepository.GenerateMock<IManufacturerService>();
            _productAttributeService = MockRepository.GenerateMock<IProductAttributeService>();
            _pictureService = MockRepository.GenerateMock<IPictureService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock<INewsLetterSubscriptionService>();

            _exportManager = new ExportManager(_categoryService,
                _manufacturerService, _productAttributeService, _pictureService, _newsLetterSubscriptionService);
        }
 public SitemapGenerator(ICategoryService categoryService,
     IProductService productService, IManufacturerService manufacturerService,
     ITopicService topicService, CommonSettings commonSettings, IWebHelper webHelper)
 {
     this._categoryService = categoryService;
     this._productService = productService;
     this._manufacturerService = manufacturerService;
     this._topicService = topicService;
     this._commonSettings = commonSettings;
     this._webHelper = webHelper;
 }
 public ManufacturerFormController(ManufacturerForm instance)
 {
     this.frmManufacturer = instance;
     this.srvManufacturer = SamsaraAppContext.Resolve <IManufacturerService>();
     this.InitializeFormControls();
 }
示例#32
0
        public CatalogModelFactory(BlogSettings blogSettings,
                                   CatalogSettings catalogSettings,
                                   DisplayDefaultMenuItemSettings displayDefaultMenuItemSettings,
                                   ForumSettings forumSettings,
                                   IActionContextAccessor actionContextAccessor,
                                   ICategoryService categoryService,
                                   ICategoryTemplateService categoryTemplateService,
                                   ICurrencyService currencyService,
                                   IEventPublisher eventPublisher,
                                   IHttpContextAccessor httpContextAccessor,
                                   ILocalizationService localizationService,
                                   IManufacturerService manufacturerService,
                                   IManufacturerTemplateService manufacturerTemplateService,
                                   IPictureService pictureService,
                                   IPriceFormatter priceFormatter,
                                   IProductModelFactory productModelFactory,
                                   IProductService productService,
                                   IProductTagService productTagService,
                                   ISearchTermService searchTermService,
                                   ISpecificationAttributeService specificationAttributeService,
                                   IStaticCacheManager cacheManager,
                                   IStoreContext storeContext,
                                   ITopicService topicService,
                                   IUrlHelperFactory urlHelperFactory,
                                   IUrlRecordService urlRecordService,
                                   IVendorService vendorService,
                                   IWebHelper webHelper,
                                   IWorkContext workContext,
                                   MediaSettings mediaSettings,
                                   VendorSettings vendorSettings,
                                   LuceneSettings luceneSettings, ILuceneService luceneService,
                                   ICacheKeyService cacheKeyService, ICustomerService customerService, IStaticCacheManager staticCacheManager)
            : base(blogSettings,
                   catalogSettings,
                   displayDefaultMenuItemSettings,
                   forumSettings,
                   actionContextAccessor,
                   cacheKeyService,
                   categoryService,
                   categoryTemplateService,
                   currencyService,
                   customerService,
                   eventPublisher,
                   httpContextAccessor,
                   localizationService,
                   manufacturerService,
                   manufacturerTemplateService,
                   pictureService,
                   priceFormatter,
                   productModelFactory,
                   productService,
                   productTagService,
                   searchTermService,
                   specificationAttributeService,
                   staticCacheManager,
                   storeContext,
                   topicService,
                   urlHelperFactory,
                   urlRecordService,
                   vendorService,
                   webHelper,
                   workContext,
                   mediaSettings,
                   vendorSettings)
        {
            _blogSettings    = blogSettings;
            _catalogSettings = catalogSettings;
            _displayDefaultMenuItemSettings = displayDefaultMenuItemSettings;
            _forumSettings                 = forumSettings;
            _actionContextAccessor         = actionContextAccessor;
            _categoryService               = categoryService;
            _categoryTemplateService       = categoryTemplateService;
            _currencyService               = currencyService;
            _eventPublisher                = eventPublisher;
            _httpContextAccessor           = httpContextAccessor;
            _localizationService           = localizationService;
            _manufacturerService           = manufacturerService;
            _manufacturerTemplateService   = manufacturerTemplateService;
            _pictureService                = pictureService;
            _priceFormatter                = priceFormatter;
            _productModelFactory           = productModelFactory;
            _productService                = productService;
            _productTagService             = productTagService;
            _searchTermService             = searchTermService;
            _specificationAttributeService = specificationAttributeService;
            _cacheManager     = cacheManager;
            _storeContext     = storeContext;
            _topicService     = topicService;
            _urlHelperFactory = urlHelperFactory;
            _urlRecordService = urlRecordService;
            _vendorService    = vendorService;
            _webHelper        = webHelper;
            _workContext      = workContext;
            _mediaSettings    = mediaSettings;
            _vendorSettings   = vendorSettings;
            _customerService  = customerService;
            _cacheKeyService  = cacheKeyService;

            _luceneSettings = luceneSettings;
            _luceneService  = luceneService;
        }
示例#33
0
        public HomeController(IManufacturerService manufacturerService, IMobileService mobileService)
        {
            _manufacturerService = manufacturerService;
            _mobileService       = mobileService;

            #region SavingData
            if (_manufacturerService.Set().Count() == 0)
            {
                _manufacturerService.Save(new Manufacturer()
                {
                    Name = "Samsung"
                });
                _manufacturerService.Save(new Manufacturer()
                {
                    Name = "Apple"
                });
                _manufacturerService.Save(new Manufacturer()
                {
                    Name = "Huawei"
                });
                _manufacturerService.Save(new Manufacturer()
                {
                    Name = "Xiaomi"
                });
                _manufacturerService.Commit();
            }
            if (_mobileService.Set().Count() == 0)
            {
                _mobileService.Save(new Mobile()
                {
                    Name           = "Samsung Galaxy s7",
                    Price          = 700,
                    ImageURL       = "https://image-us.samsung.com/SamsungUS/home/mobile/phones/pdp/sm-g935/gallery/SMG935_edge_102116.jpg?$product-details-jpg$",
                    ManufacturerID = _manufacturerService.Set().Single(s => s.Name == "Samsung").ID,
                    OS             = "Android",
                    Processor      = "Smth",
                    Memory         = 16
                });
                _mobileService.Save(new Mobile()
                {
                    Name           = "Xiaomi Mi 6",
                    Price          = 650,
                    ImageURL       = "https://drop.ndtv.com/TECH/product_database/images/419201714803PM_635_xiaomi_mi_6.jpeg?downsize=*:180&output-quality=80",
                    ManufacturerID = _manufacturerService.Set().Single(s => s.Name == "Xiaomi").ID,
                    OS             = "Android",
                    Processor      = "Smth",
                    Memory         = 16
                });
                _mobileService.Save(new Mobile()
                {
                    Name           = "iPhone 6",
                    Price          = 999,
                    ImageURL       = "https://drop.ndtv.com/TECH/product_database/images/910201410301AM_635_apple_iphone_6.jpeg?downsize=*:180&output-quality=80",
                    ManufacturerID = _manufacturerService.Set().Single(s => s.Name == "Apple").ID,
                    OS             = "iOS",
                    Processor      = "Smth",
                    Memory         = 32,
                    VideoLink      = "https://www.youtube.com/watch?v=61TAqY03xwk"
                });
                _mobileService.Commit();
            }
            #endregion
        }
示例#34
0
 public EditModel(ISupplierService supplierService, IProductService productService, ICategoryService categoryService, IManufacturerService manufacturerService)
 {
     _productService      = productService;
     _categoryService     = categoryService;
     _manufacturerService = manufacturerService;
     _supplierService     = supplierService;
 }
示例#35
0
 public ReOrderService(OrderManagementContext context, IManufacturerService manufacturerService, IVendorService vendorService)
 {
     this._context          = context;
     this._allManufacturers = manufacturerService.GetAllManufacturers().ToList();
     this._allVendors       = vendorService.GetAllVendors().ToList();
 }
 public AdminWebPushController(ProgressiveWebAppSettings progressiveWebAppSettings, ISettingService settingService, ILocalizationService localizationService, IPermissionService permissionService, IWorkContext workContext, VendorSettings vendorSettings, ICategoryService categoryService, ICacheManager cacheManager, IStoreService storeService, IShippingService shippingService, IVendorService vendorService, IManufacturerService manufacturerService, IProductService productService, IPictureService pictureService, ICustomerServiceExtend customerServiceExtend, ICustomerService customerService, CustomerSettings customerSettings, IDateTimeHelper dateTimeHelper)
 {
     _progressiveWebAppSettings = progressiveWebAppSettings;
     _settingService            = settingService;
     _localizationService       = localizationService;
     _permissionService         = permissionService;
     _categoryService           = categoryService;
     _cacheManager          = cacheManager;
     _storeService          = storeService;
     _vendorService         = vendorService;
     _manufacturerService   = manufacturerService;
     _productService        = productService;
     _customerService       = customerService;
     _customerServiceExtend = customerServiceExtend;
     _customerSettings      = customerSettings;
     _dateTimeHelper        = dateTimeHelper;
 }
示例#37
0
        public ManufacturerProductModelValidator(ILocalizationService localizationService, IManufacturerService manufacturerService, IWorkContext workContext)
        {
            if (workContext.CurrentCustomer.IsStaff())
            {
                RuleFor(x => x).MustAsync(async(x, y, context) =>
                {
                    var manufacturer = await manufacturerService.GetManufacturerById(x.ManufacturerId);
                    if (manufacturer != null)
                    {
                        if (!manufacturer.AccessToEntityByStore(workContext.CurrentCustomer.StaffStoreId))
                        {
                            return(false);
                        }
                    }

                    return(true);
                }).WithMessage(localizationService.GetResource("Admin.Catalog.Manufacturers.Permisions"));
            }
        }
 public CategoryViewModelService(ICategoryService categoryService, ICategoryTemplateService categoryTemplateService, IDiscountService discountService,
                                 ILocalizationService localizationService, IStoreService storeService, ICustomerService customerService, IPictureService pictureService,
                                 IUrlRecordService urlRecordService, ICustomerActivityService customerActivityService, IProductService productService, IManufacturerService manufacturerService,
                                 IVendorService vendorService, IDateTimeHelper dateTimeHelper, CatalogSettings catalogSettings)
 {
     _categoryService         = categoryService;
     _categoryTemplateService = categoryTemplateService;
     _discountService         = discountService;
     _localizationService     = localizationService;
     _storeService            = storeService;
     _customerService         = customerService;
     _urlRecordService        = urlRecordService;
     _customerActivityService = customerActivityService;
     _productService          = productService;
     _pictureService          = pictureService;
     _manufacturerService     = manufacturerService;
     _vendorService           = vendorService;
     _catalogSettings         = catalogSettings;
     _dateTimeHelper          = dateTimeHelper;
 }
        public async Task <IActionResult> ManufacturerAddPopupList(DataSourceRequest command, DiscountModel.AddManufacturerToDiscountModel model, [FromServices] IManufacturerService manufacturerService)
        {
            var manufacturers = await manufacturerService.GetAllManufacturers(model.SearchManufacturerName, "",
                                                                              command.Page - 1, command.PageSize, true);

            var gridModel = new DataSourceResult {
                Data  = manufacturers.Select(x => x.ToModel()),
                Total = manufacturers.TotalCount
            };

            return(Json(gridModel));
        }
        public async Task <IActionResult> ManufacturerDelete(string discountId, string manufacturerId, [FromServices] IManufacturerService manufacturerService)
        {
            var discount = await _discountService.GetDiscountById(discountId);

            if (discount == null)
            {
                throw new Exception("No discount found with the specified id");
            }

            var manufacturer = await manufacturerService.GetManufacturerById(manufacturerId);

            if (manufacturer == null)
            {
                throw new Exception("No manufacturer found with the specified id");
            }

            if (ModelState.IsValid)
            {
                await _discountViewModelService.DeleteManufacturer(discount, manufacturer);

                return(new NullJsonResult());
            }
            return(ErrorForKendoGridJson(ModelState));
        }
        public async Task <IActionResult> ManufacturerList(DataSourceRequest command, string discountId, [FromServices] IManufacturerService manufacturerService)
        {
            var discount = await _discountService.GetDiscountById(discountId);

            if (discount == null)
            {
                throw new Exception("No discount found with the specified id");
            }

            var manufacturers = await manufacturerService.GetAllManufacturersByDiscount(discount.Id);

            var gridModel = new DataSourceResult {
                Data = manufacturers.Select(x => new DiscountModel.AppliedToManufacturerModel {
                    ManufacturerId   = x.Id,
                    ManufacturerName = x.Name
                }),
                Total = manufacturers.Count
            };

            return(Json(gridModel));
        }
示例#42
0
 public ManufacturerController(IMapper mapper, IManufacturerService manufacturerService)
 {
     _mapper = mapper;
     _manufacturerService = manufacturerService;
 }
示例#43
0
 public CatalogHelper(
     SmartDbContext db,
     ICommonServices services,
     IMenuService menuService,
     IManufacturerService manufacturerService,
     IProductService productService,
     //IProductTemplateService productTemplateService,
     IProductAttributeService productAttributeService,
     IProductAttributeMaterializer productAttributeMaterializer,
     IProductAttributeFormatter productAttributeFormatter,
     ITaxService taxService,
     ICurrencyService currencyService,
     IMediaService mediaService,
     IPriceCalculationService priceCalculationService,
     //IPriceFormatter priceFormatter,
     //ISpecificationAttributeService specificationAttributeService,
     IDateTimeHelper dateTimeHelper,
     //IBackInStockSubscriptionService backInStockSubscriptionService,
     IDownloadService downloadService,
     MediaSettings mediaSettings,
     CatalogSettings catalogSettings,
     CustomerSettings customerSettings,
     CaptchaSettings captchaSettings,
     IMeasureService measureService,
     //IQuantityUnitService quantityUnitService,
     MeasureSettings measureSettings,
     TaxSettings taxSettings,
     PerformanceSettings performanceSettings,
     IDeliveryTimeService deliveryTimeService,
     Lazy <IDataExporter> dataExporter,
     ICatalogSearchService catalogSearchService,
     ICatalogSearchQueryFactory catalogSearchQueryFactory,
     IUrlHelper urlHelper,
     ProductUrlHelper productUrlHelper,
     ILocalizedEntityService localizedEntityService,
     IUrlService urlService,
     ILinkResolver linkResolver)
 {
     _db                  = db;
     _services            = services;
     _workContext         = services.WorkContext;
     _storeContext        = services.StoreContext;
     _cache               = services.Cache;
     _menuService         = menuService;
     _manufacturerService = manufacturerService;
     _productService      = productService;
     //_productTemplateService = productTemplateService;
     _productAttributeService      = productAttributeService;
     _productAttributeMaterializer = productAttributeMaterializer;
     _productAttributeFormatter    = productAttributeFormatter;
     _taxService              = taxService;
     _currencyService         = currencyService;
     _mediaService            = mediaService;
     _localizationService     = _services.Localization;
     _priceCalculationService = priceCalculationService;
     //_priceFormatter = priceFormatter;
     //_specificationAttributeService = specificationAttributeService;
     _dateTimeHelper = dateTimeHelper;
     //_backInStockSubscriptionService = backInStockSubscriptionService;
     _downloadService = downloadService;
     _measureService  = measureService;
     //_quantityUnitService = quantityUnitService;
     _measureSettings           = measureSettings;
     _taxSettings               = taxSettings;
     _performanceSettings       = performanceSettings;
     _deliveryTimeService       = deliveryTimeService;
     _mediaSettings             = mediaSettings;
     _catalogSettings           = catalogSettings;
     _customerSettings          = customerSettings;
     _captchaSettings           = captchaSettings;
     _dataExporter              = dataExporter;
     _catalogSearchService      = catalogSearchService;
     _catalogSearchQueryFactory = catalogSearchQueryFactory;
     _urlHelper              = urlHelper;
     _productUrlHelper       = productUrlHelper;
     _localizedEntityService = localizedEntityService;
     _urlService             = urlService;
     _linkResolver           = linkResolver;
     _httpRequest            = _urlHelper.ActionContext.HttpContext.Request;
 }
示例#44
0
 public ManufacturersController(IManufacturerService manufacturers)
 {
     this.manufacturers = manufacturers;
 }
        public new void SetUp()
        {
            _workContext = null;
            _services    = MockRepository.GenerateMock <ICommonServices>();

            _store = new Store()
            {
                Id = 1
            };
            _storeContext = MockRepository.GenerateMock <IStoreContext>();
            _storeContext.Expect(x => x.CurrentStore).Return(_store);

            var pluginFinder = PluginFinder.Current;

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings      = new CatalogSettings();

            //price calculation service
            _discountService         = MockRepository.GenerateMock <IDiscountService>();
            _categoryService         = MockRepository.GenerateMock <ICategoryService>();
            _manufacturerService     = MockRepository.GenerateMock <IManufacturerService>();
            _productAttributeParser  = MockRepository.GenerateMock <IProductAttributeParser>();
            _productAttributeService = MockRepository.GenerateMock <IProductAttributeService>();
            _genericAttributeService = MockRepository.GenerateMock <IGenericAttributeService>();
            _eventPublisher          = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _localizationService = MockRepository.GenerateMock <ILocalizationService>();
            _settingService      = MockRepository.GenerateMock <ISettingService>();
            _cartRuleProvider    = MockRepository.GenerateMock <ICartRuleProvider>();

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = MockRepository.GenerateMock <IRepository <ShippingMethod> >();
            _storeMappingRepository   = MockRepository.GenerateMock <IRepository <StoreMapping> >();

            _shippingService = new ShippingService(
                _shippingMethodRepository,
                _storeMappingRepository,
                _productAttributeParser,
                _productService,
                _checkoutAttributeParser,
                _genericAttributeService,
                _shippingSettings,
                _settingService,
                this.ProviderManager,
                _services,
                _cartRuleProvider);

            _shipmentService = MockRepository.GenerateMock <IShipmentService>();

            _paymentService          = MockRepository.GenerateMock <IPaymentService>();
            _providerManager         = MockRepository.GenerateMock <IProviderManager>();
            _checkoutAttributeParser = MockRepository.GenerateMock <ICheckoutAttributeParser>();
            _giftCardService         = MockRepository.GenerateMock <IGiftCardService>();

            //tax
            _taxSettings = new TaxSettings();
            _taxSettings.ShippingIsTaxable = true;
            _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true;
            _taxSettings.DefaultTaxAddressId = 10;

            _addressService = MockRepository.GenerateMock <IAddressService>();
            _addressService.Expect(x => x.GetAddressById(_taxSettings.DefaultTaxAddressId)).Return(new Address()
            {
                Id = _taxSettings.DefaultTaxAddressId
            });
            _downloadService  = MockRepository.GenerateMock <IDownloadService>();
            _httpRequestBase  = MockRepository.GenerateMock <HttpRequestBase>();
            _geoCountryLookup = MockRepository.GenerateMock <IGeoCountryLookup>();

            _taxService = new TaxService(_addressService, _workContext, _taxSettings, _shoppingCartSettings, pluginFinder, _geoCountryLookup, this.ProviderManager);

            _rewardPointsSettings = new RewardPointsSettings();

            _priceCalcService = new PriceCalculationService(_discountService, _categoryService, _manufacturerService, _productAttributeParser, _productService,
                                                            _catalogSettings, _productAttributeService, _downloadService, _services, _httpRequestBase, _taxService, _taxSettings);

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext,
                                                                      _priceCalcService, _taxService, _shippingService, _providerManager,
                                                                      _checkoutAttributeParser, _discountService, _giftCardService, _genericAttributeService, _paymentService, _currencyService, _productAttributeParser,
                                                                      _taxSettings, _rewardPointsSettings, _shippingSettings, _shoppingCartSettings, _catalogSettings);

            _orderService                  = MockRepository.GenerateMock <IOrderService>();
            _webHelper                     = MockRepository.GenerateMock <IWebHelper>();
            _languageService               = MockRepository.GenerateMock <ILanguageService>();
            _productService                = MockRepository.GenerateMock <IProductService>();
            _priceFormatter                = MockRepository.GenerateMock <IPriceFormatter>();
            _productAttributeFormatter     = MockRepository.GenerateMock <IProductAttributeFormatter>();
            _shoppingCartService           = MockRepository.GenerateMock <IShoppingCartService>();
            _checkoutAttributeFormatter    = MockRepository.GenerateMock <ICheckoutAttributeFormatter>();
            _customerService               = MockRepository.GenerateMock <ICustomerService>();
            _encryptionService             = MockRepository.GenerateMock <IEncryptionService>();
            _messageFactory                = MockRepository.GenerateMock <IMessageFactory>();
            _customerActivityService       = MockRepository.GenerateMock <ICustomerActivityService>();
            _currencyService               = MockRepository.GenerateMock <ICurrencyService>();
            _affiliateService              = MockRepository.GenerateMock <IAffiliateService>();
            _newsLetterSubscriptionService = MockRepository.GenerateMock <INewsLetterSubscriptionService>();
            _affiliateService              = MockRepository.GenerateMock <IAffiliateService>();
            _checkoutAttributeParser       = MockRepository.GenerateMock <ICheckoutAttributeParser>();
            _downloadService               = MockRepository.GenerateMock <IDownloadService>();

            _paymentSettings = new PaymentSettings()
            {
                ActivePaymentMethodSystemNames = new List <string>()
                {
                    "Payments.TestMethod"
                }
            };
            _orderSettings = new OrderSettings();

            _localizationSettings = new LocalizationSettings();

            _eventPublisher = MockRepository.GenerateMock <IEventPublisher>();
            _eventPublisher.Expect(x => x.Publish(Arg <object> .Is.Anything));

            _orderProcessingService = new OrderProcessingService(_orderService, _webHelper,
                                                                 _localizationService, _languageService,
                                                                 _productService, _paymentService,
                                                                 _orderTotalCalcService, _priceCalcService, _priceFormatter,
                                                                 _productAttributeParser, _productAttributeFormatter,
                                                                 _giftCardService, _shoppingCartService, _checkoutAttributeFormatter, _checkoutAttributeParser,
                                                                 _shippingService, _shipmentService, _taxService,
                                                                 _customerService, _discountService,
                                                                 _encryptionService, _workContext, _storeContext,
                                                                 _messageFactory, _customerActivityService, _currencyService, _affiliateService,
                                                                 _eventPublisher, _genericAttributeService,
                                                                 _newsLetterSubscriptionService, _downloadService,
                                                                 _paymentSettings, _rewardPointsSettings,
                                                                 _orderSettings, _taxSettings, _localizationSettings,
                                                                 _shoppingCartSettings,
                                                                 _catalogSettings);
        }
示例#46
0
 public ShipmentController(
     IShipmentViewModelService shipmentViewModelService,
     IOrderService orderService,
     IOrderProcessingService orderProcessingService,
     ILocalizationService localizationService,
     IWorkContext workContext,
     IMeasureService measureService,
     IPdfService pdfService,
     IProductService productService,
     IExportManager exportManager,
     IWorkflowMessageService workflowMessageService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     IProductAttributeFormatter productAttributeFormatter,
     IShoppingCartService shoppingCartService,
     IGiftCardService giftCardService,
     IDownloadService downloadService,
     IShipmentService shipmentService,
     IShippingService shippingService,
     IStoreService storeService,
     IVendorService vendorService,
     IAddressAttributeParser addressAttributeParser,
     IAddressAttributeService addressAttributeService,
     IAddressAttributeFormatter addressAttributeFormatter,
     IAffiliateService affiliateService,
     IPictureService pictureService,
     ITaxService taxService,
     IReturnRequestService returnRequestService,
     ICustomerService customerService,
     ICustomerActivityService customerActivityService,
     CurrencySettings currencySettings,
     TaxSettings taxSettings,
     MeasureSettings measureSettings,
     AddressSettings addressSettings,
     ShippingSettings shippingSettings,
     MediaSettings mediaSettings)
 {
     this._shipmentViewModelService = shipmentViewModelService;
     this._orderService             = orderService;
     this._orderProcessingService   = orderProcessingService;
     this._localizationService      = localizationService;
     this._workContext               = workContext;
     this._measureService            = measureService;
     this._pdfService                = pdfService;
     this._productService            = productService;
     this._exportManager             = exportManager;
     this._workflowMessageService    = workflowMessageService;
     this._categoryService           = categoryService;
     this._manufacturerService       = manufacturerService;
     this._productAttributeService   = productAttributeService;
     this._productAttributeParser    = productAttributeParser;
     this._productAttributeFormatter = productAttributeFormatter;
     this._shoppingCartService       = shoppingCartService;
     this._giftCardService           = giftCardService;
     this._downloadService           = downloadService;
     this._shipmentService           = shipmentService;
     this._shippingService           = shippingService;
     this._storeService              = storeService;
     this._vendorService             = vendorService;
     this._addressAttributeParser    = addressAttributeParser;
     this._addressAttributeService   = addressAttributeService;
     this._addressAttributeFormatter = addressAttributeFormatter;
     this._affiliateService          = affiliateService;
     this._pictureService            = pictureService;
     this._taxService                = taxService;
     this._returnRequestService      = returnRequestService;
     this._customerActivityService   = customerActivityService;
     this._currencySettings          = currencySettings;
     this._taxSettings               = taxSettings;
     this._measureSettings           = measureSettings;
     this._addressSettings           = addressSettings;
     this._shippingSettings          = shippingSettings;
     this._customerService           = customerService;
     this._mediaSettings             = mediaSettings;
 }
示例#47
0
 public ProductListController(ICategoryService categoryService, IProductService productService, IManufacturerService manufacturerService)
 {
     _categoryService     = categoryService;
     _productService      = productService;
     _manufacturerService = manufacturerService;
 }
示例#48
0
        public SelectManufacturerPageViewModel(INavigationService navigationService,
                                               IManufacturerService manufacturerService,
                                               IDialogService dialogService
                                               ) : base(navigationService, dialogService)
        {
            Title = "选择供应商";

            _navigationService   = navigationService;
            _dialogService       = dialogService;
            _manufacturerService = manufacturerService;

            //Load
            this.Load = ManufacturersLoader.Load(async() =>
            {
                //重载时排它
                ItemTreshold = 1;
                try
                {
                    //清除列表
                    Manufacturers.Clear();

                    var items = await GetManufacturersPage(0, PageSize);
                    if (items != null)
                    {
                        foreach (var item in items)
                        {
                            if (Manufacturers.Count(s => s.Id == item.Id) == 0)
                            {
                                Manufacturers.Add(item);
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    Crashes.TrackError(ex);
                }

                this.Manufacturers = new ObservableRangeCollection <ManufacturerModel>(Manufacturers);


                return(Manufacturers.ToList());
            });

            //以增量方式加载数据
            this.ItemTresholdReachedCommand = ReactiveCommand.Create(async() =>
            {
                using (var dig = UserDialogs.Instance.Loading("加载中..."))
                {
                    try
                    {
                        int pageIdex         = Manufacturers.Count / (PageSize == 0 ? 1 : PageSize);
                        var items            = await GetManufacturersPage(pageIdex, PageSize);
                        var previousLastItem = Terminals.Last();
                        if (items != null)
                        {
                            foreach (var item in items)
                            {
                                if (Manufacturers.Count(s => s.Id == item.Id) == 0)
                                {
                                    Manufacturers.Add(item);
                                }
                            }

                            if (items.Count() == 0 || items.Count() == Terminals.Count)
                            {
                                ItemTreshold = -1;
                                return(Manufacturers.ToList());
                            }
                        }
                    }
                    catch (Exception ex)
                    {
                        Crashes.TrackError(ex);
                        ItemTreshold = -1;
                    }


                    this.Manufacturers = new ObservableRangeCollection <ManufacturerModel>(Manufacturers);
                    return(Manufacturers.ToList());
                }
            }, this.WhenAny(x => x.Terminals, x => x.GetValue().Count > 0));


            this.WhenAnyValue(x => x.Selecter).Throttle(TimeSpan.FromMilliseconds(500))
            .Skip(1)
            .Where(x => x != null)
            .SubOnMainThread(async item =>
            {
                await _navigationService.GoBackAsync(("Manufacturer", item));
                this.Selecter = null;
            }).DisposeWith(DeactivateWith);

            this.BindBusyCommand(Load);
        }
示例#49
0
 public ProductController(
     ICommonServices services,
     IManufacturerService manufacturerService,
     IProductService productService,
     IProductAttributeService productAttributeService,
     IProductAttributeParser productAttributeParser,
     ITaxService taxService,
     ICurrencyService currencyService,
     IPictureService pictureService,
     IPriceCalculationService priceCalculationService,
     IPriceFormatter priceFormatter,
     ICustomerContentService customerContentService,
     ICustomerService customerService,
     IShoppingCartService shoppingCartService,
     IRecentlyViewedProductsService recentlyViewedProductsService,
     IProductTagService productTagService,
     IOrderReportService orderReportService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IAclService aclService,
     IStoreMappingService storeMappingService,
     MediaSettings mediaSettings,
     SeoSettings seoSettings,
     CatalogSettings catalogSettings,
     ShoppingCartSettings shoppingCartSettings,
     LocalizationSettings localizationSettings,
     CaptchaSettings captchaSettings,
     CatalogHelper helper,
     IDownloadService downloadService,
     ILocalizationService localizationService,
     IBreadcrumb breadcrumb,
     Lazy <PrivacySettings> privacySettings)
 {
     _services                       = services;
     _manufacturerService            = manufacturerService;
     _productService                 = productService;
     _productAttributeService        = productAttributeService;
     _productAttributeParser         = productAttributeParser;
     _taxService                     = taxService;
     _currencyService                = currencyService;
     _pictureService                 = pictureService;
     _priceCalculationService        = priceCalculationService;
     _priceFormatter                 = priceFormatter;
     _customerContentService         = customerContentService;
     _customerService                = customerService;
     _shoppingCartService            = shoppingCartService;
     _recentlyViewedProductsService  = recentlyViewedProductsService;
     _productTagService              = productTagService;
     _orderReportService             = orderReportService;
     _backInStockSubscriptionService = backInStockSubscriptionService;
     _aclService                     = aclService;
     _storeMappingService            = storeMappingService;
     _mediaSettings                  = mediaSettings;
     _seoSettings                    = seoSettings;
     _catalogSettings                = catalogSettings;
     _shoppingCartSettings           = shoppingCartSettings;
     _localizationSettings           = localizationSettings;
     _captchaSettings                = captchaSettings;
     _helper              = helper;
     _downloadService     = downloadService;
     _localizationService = localizationService;
     _breadcrumb          = breadcrumb;
     _privacySettings     = privacySettings;
 }
 public ManufacturerController(IServiceFactory serviceFactory, IFilterServiceFactory filterServiceFactory)
     : base(filterServiceFactory)
 {
     _manufacturerService = serviceFactory.ManufacturerService;
 }
示例#51
0
 public OverriddenProductController(AvalaraTaxManager avalaraTaxManager,
                                    IAclService aclService,
                                    IBackInStockSubscriptionService backInStockSubscriptionService,
                                    ICategoryService categoryService,
                                    ICopyProductService copyProductService,
                                    ICustomerActivityService customerActivityService,
                                    ICustomerService customerService,
                                    IDiscountService discountService,
                                    IDownloadService downloadService,
                                    IExportManager exportManager,
                                    IImportManager importManager,
                                    ILanguageService languageService,
                                    ILocalizationService localizationService,
                                    ILocalizedEntityService localizedEntityService,
                                    IManufacturerService manufacturerService,
                                    INopFileProvider fileProvider,
                                    INotificationService notificationService,
                                    IPdfService pdfService,
                                    IPermissionService permissionService,
                                    IPictureService pictureService,
                                    IProductAttributeParser productAttributeParser,
                                    IProductAttributeService productAttributeService,
                                    IProductModelFactory productModelFactory,
                                    IProductService productService,
                                    IProductTagService productTagService,
                                    ISettingService settingService,
                                    IShippingService shippingService,
                                    IShoppingCartService shoppingCartService,
                                    ISpecificationAttributeService specificationAttributeService,
                                    ITaxCategoryService taxCategoryService,
                                    ITaxPluginManager taxPluginManager,
                                    IUrlRecordService urlRecordService,
                                    IWorkContext workContext,
                                    VendorSettings vendorSettings) : base(aclService,
                                                                          backInStockSubscriptionService,
                                                                          categoryService,
                                                                          copyProductService,
                                                                          customerActivityService,
                                                                          customerService,
                                                                          discountService,
                                                                          downloadService,
                                                                          exportManager,
                                                                          importManager,
                                                                          languageService,
                                                                          localizationService,
                                                                          localizedEntityService,
                                                                          manufacturerService,
                                                                          fileProvider,
                                                                          notificationService,
                                                                          pdfService,
                                                                          permissionService,
                                                                          pictureService,
                                                                          productAttributeParser,
                                                                          productAttributeService,
                                                                          productModelFactory,
                                                                          productService,
                                                                          productTagService,
                                                                          settingService,
                                                                          shippingService,
                                                                          shoppingCartService,
                                                                          specificationAttributeService,
                                                                          urlRecordService,
                                                                          workContext,
                                                                          vendorSettings)
 {
     _avalaraTaxManager       = avalaraTaxManager;
     _localizationService     = localizationService;
     _notificationService     = notificationService;
     _permissionService       = permissionService;
     _productAttributeService = productAttributeService;
     _productService          = productService;
     _taxCategoryService      = taxCategoryService;
     _taxPluginManager        = taxPluginManager;
 }
示例#52
0
        public void TestInitialize()
        {
            new Grand.Services.Tests.ServiceTest().PluginInitializator();

            _workContext          = new Mock <IWorkContext>().Object;
            _stateProvinceService = new Mock <IStateProvinceService>().Object;

            _store = new Store {
                Id = "1"
            };
            var tempStoreContext = new Mock <IStoreContext>();

            {
                tempStoreContext.Setup(x => x.CurrentStore).Returns(_store);
                _storeContext = tempStoreContext.Object;
            }

            _productService = new Mock <IProductService>().Object;
            var tempEventPublisher = new Mock <IMediator>();
            {
                //tempEventPublisher.Setup(x => x.PublishAsync(It.IsAny<object>()));
                _eventPublisher = tempEventPublisher.Object;
            }

            var pluginFinder = new PluginFinder(_serviceProvider);
            var cacheManager = new TestMemoryCacheManager(new Mock <IMemoryCache>().Object, _eventPublisher);

            _discountService        = new Mock <IDiscountService>().Object;
            _categoryService        = new Mock <ICategoryService>().Object;
            _manufacturerService    = new Mock <IManufacturerService>().Object;
            _productAttributeParser = new Mock <IProductAttributeParser>().Object;
            _vendorService          = new Mock <IVendorService>().Object;
            _currencyService        = new Mock <ICurrencyService>().Object;
            _serviceProvider        = new Mock <IServiceProvider>().Object;

            _shoppingCartSettings = new ShoppingCartSettings();
            _catalogSettings      = new CatalogSettings();
            _customerService      = new Mock <ICustomerService>().Object;

            _priceCalcService = new PriceCalculationService(_workContext, _storeContext,
                                                            _discountService, _categoryService,
                                                            _manufacturerService, _productAttributeParser, _productService, _customerService,
                                                            _vendorService, _currencyService,
                                                            _shoppingCartSettings, _catalogSettings);


            _localizationService = new Mock <ILocalizationService>().Object;

            //shipping
            _shippingSettings = new ShippingSettings();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames = new List <string>();
            _shippingSettings.ActiveShippingRateComputationMethodSystemNames.Add("FixedRateTestShippingRateComputationMethod");
            _shippingMethodRepository = new Mock <IRepository <ShippingMethod> >().Object;
            _deliveryDateRepository   = new Mock <IRepository <DeliveryDate> >().Object;
            _warehouseRepository      = new Mock <IRepository <Warehouse> >().Object;
            _logger                  = new NullLogger();
            _paymentService          = new Mock <IPaymentService>().Object;
            _checkoutAttributeParser = new Mock <ICheckoutAttributeParser>().Object;
            _giftCardService         = new Mock <IGiftCardService>().Object;
            _genericAttributeService = new Mock <IGenericAttributeService>().Object;
            _geoLookupService        = new Mock <IGeoLookupService>().Object;
            _countryService          = new Mock <ICountryService>().Object;
            _customerSettings        = new CustomerSettings();
            _addressSettings         = new AddressSettings();

            //tax
            _taxSettings = new TaxSettings();
            _taxSettings.ShippingIsTaxable = true;
            _taxSettings.PaymentMethodAdditionalFeeIsTaxable = true;
            _taxSettings.DefaultTaxAddressId = "10";

            _shippingService = new ShippingService(_shippingMethodRepository,
                                                   _deliveryDateRepository,
                                                   _warehouseRepository,
                                                   null,
                                                   _logger,
                                                   _productService,
                                                   _productAttributeParser,
                                                   _checkoutAttributeParser,
                                                   _localizationService,
                                                   _addressService,
                                                   _countryService,
                                                   _stateProvinceService,
                                                   pluginFinder,
                                                   _storeContext,
                                                   _eventPublisher,
                                                   _currencyService,
                                                   cacheManager,
                                                   null,
                                                   _shoppingCartSettings,
                                                   _shippingSettings);



            var tempAddressService = new Mock <IAddressService>();

            {
                tempAddressService.Setup(x => x.GetAddressByIdSettings(_taxSettings.DefaultTaxAddressId))
                .ReturnsAsync(new Address {
                    Id = _taxSettings.DefaultTaxAddressId
                });
                _addressService = tempAddressService.Object;
            }

            _taxService = new TaxService(_addressService, _workContext, _taxSettings,
                                         pluginFinder, _geoLookupService, _countryService, _serviceProvider, _logger, _customerSettings, _addressSettings);

            _rewardPointsSettings = new RewardPointsSettings();

            _orderTotalCalcService = new OrderTotalCalculationService(_workContext, _storeContext,
                                                                      _priceCalcService, _taxService, _shippingService, _paymentService,
                                                                      _checkoutAttributeParser, _discountService, _giftCardService,
                                                                      null, _productService, _currencyService, _taxSettings, _rewardPointsSettings,
                                                                      _shippingSettings, _shoppingCartSettings, _catalogSettings);
        }
 public GroupDealsController(
     IProductService productService,
     IProductTemplateService productTemplateService,
     ICategoryService categoryService,
     IManufacturerService manufacturerService,
     ICustomerService customerService,
     IUrlRecordService urlRecordService,
     IWorkContext workContext,
     ILanguageService languageService,
     ILocalizationService localizationService,
     ILocalizedEntityService localizedEntityService,
     ISpecificationAttributeService specificationAttributeService,
     IPictureService pictureService,
     ITaxCategoryService taxCategoryService,
     IProductTagService productTagService,
     ICopyProductService copyProductService,
     IPdfService pdfService,
     IExportManager exportManager,
     IImportManager importManager,
     ICustomerActivityService customerActivityService,
     IPermissionService permissionService,
     IAclService aclService,
     IStoreService storeService,
     IOrderService orderService,
     IStoreMappingService storeMappingService,
     IVendorService vendorService,
     IShippingService shippingService,
     IShipmentService shipmentService,
     ICurrencyService currencyService,
     CurrencySettings currencySettings,
     IMeasureService measureService,
     MeasureSettings measureSettings,
     AdminAreaSettings adminAreaSettings,
     IDateTimeHelper dateTimeHelper,
     IDiscountService discountService,
     IProductAttributeService productAttributeService,
     IBackInStockSubscriptionService backInStockSubscriptionService,
     IShoppingCartService shoppingCartService,
     IProductAttributeFormatter productAttributeFormatter,
     IProductAttributeParser productAttributeParser,
     IDownloadService downloadService,
     IRepository <GroupDeal> groupDealRepo,
     IRepository <GroupdealPicture> groupdealPictureRepo,
     IGroupDealService groupdealService,
     IGenericAttributeService genericAttributeService)
     : base(productService,
            productTemplateService,
            categoryService,
            manufacturerService,
            customerService,
            urlRecordService,
            workContext,
            languageService,
            localizationService,
            localizedEntityService,
            specificationAttributeService,
            pictureService,
            taxCategoryService,
            productTagService,
            copyProductService,
            pdfService,
            exportManager,
            importManager,
            customerActivityService,
            permissionService,
            aclService,
            storeService,
            orderService,
            storeMappingService,
            vendorService,
            shippingService,
            shipmentService,
            currencyService,
            currencySettings,
            measureService,
            measureSettings,
            adminAreaSettings,
            dateTimeHelper,
            discountService,
            productAttributeService,
            backInStockSubscriptionService,
            shoppingCartService,
            productAttributeFormatter,
            productAttributeParser,
            downloadService,
            groupDealRepo,
            groupdealPictureRepo,
            groupdealService,
            genericAttributeService)
 {
 }
示例#54
0
 public CommonModelFactory(BlogSettings blogSettings,
                           CaptchaSettings captchaSettings,
                           CatalogSettings catalogSettings,
                           CommonSettings commonSettings,
                           CustomerSettings customerSettings,
                           DisplayDefaultFooterItemSettings displayDefaultFooterItemSettings,
                           ForumSettings forumSettings,
                           IActionContextAccessor actionContextAccessor,
                           IBlogService blogService,
                           ICacheKeyService cacheKeyService,
                           ICategoryService categoryService,
                           ICurrencyService currencyService,
                           ICustomerService customerService,
                           IForumService forumService,
                           IGenericAttributeService genericAttributeService,
                           IHttpContextAccessor httpContextAccessor,
                           ILanguageService languageService,
                           ILocalizationService localizationService,
                           IManufacturerService manufacturerService,
                           INewsService newsService,
                           INopFileProvider fileProvider,
                           IPageHeadBuilder pageHeadBuilder,
                           IPermissionService permissionService,
                           IPictureService pictureService,
                           IProductService productService,
                           IProductTagService productTagService,
                           IShoppingCartService shoppingCartService,
                           ISitemapGenerator sitemapGenerator,
                           IStaticCacheManager staticCacheManager,
                           IStoreContext storeContext,
                           IThemeContext themeContext,
                           IThemeProvider themeProvider,
                           ITopicService topicService,
                           IUrlHelperFactory urlHelperFactory,
                           IUrlRecordService urlRecordService,
                           IWebHelper webHelper,
                           IWorkContext workContext,
                           LocalizationSettings localizationSettings,
                           MediaSettings mediaSettings,
                           NewsSettings newsSettings,
                           SitemapSettings sitemapSettings,
                           SitemapXmlSettings sitemapXmlSettings,
                           StoreInformationSettings storeInformationSettings,
                           VendorSettings vendorSettings)
 {
     _blogSettings     = blogSettings;
     _captchaSettings  = captchaSettings;
     _catalogSettings  = catalogSettings;
     _commonSettings   = commonSettings;
     _customerSettings = customerSettings;
     _displayDefaultFooterItemSettings = displayDefaultFooterItemSettings;
     _forumSettings           = forumSettings;
     _actionContextAccessor   = actionContextAccessor;
     _blogService             = blogService;
     _cacheKeyService         = cacheKeyService;
     _categoryService         = categoryService;
     _currencyService         = currencyService;
     _customerService         = customerService;
     _forumService            = forumService;
     _genericAttributeService = genericAttributeService;
     _httpContextAccessor     = httpContextAccessor;
     _languageService         = languageService;
     _localizationService     = localizationService;
     _manufacturerService     = manufacturerService;
     _newsService             = newsService;
     _fileProvider            = fileProvider;
     _pageHeadBuilder         = pageHeadBuilder;
     _permissionService       = permissionService;
     _pictureService          = pictureService;
     _productService          = productService;
     _productTagService       = productTagService;
     _shoppingCartService     = shoppingCartService;
     _sitemapGenerator        = sitemapGenerator;
     _staticCacheManager      = staticCacheManager;
     _storeContext            = storeContext;
     _themeContext            = themeContext;
     _themeProvider           = themeProvider;
     _topicService            = topicService;
     _urlHelperFactory        = urlHelperFactory;
     _urlRecordService        = urlRecordService;
     _webHelper                = webHelper;
     _workContext              = workContext;
     _mediaSettings            = mediaSettings;
     _localizationSettings     = localizationSettings;
     _newsSettings             = newsSettings;
     _sitemapSettings          = sitemapSettings;
     _sitemapXmlSettings       = sitemapXmlSettings;
     _storeInformationSettings = storeInformationSettings;
     _vendorSettings           = vendorSettings;
 }
 public CommonModelFactory(BlogSettings blogSettings,
                           CaptchaSettings captchaSettings,
                           CatalogSettings catalogSettings,
                           CommonSettings commonSettings,
                           CustomerSettings customerSettings,
                           DisplayDefaultFooterItemSettings displayDefaultFooterItemSettings,
                           ForumSettings forumSettings,
                           IActionContextAccessor actionContextAccessor,
                           ICategoryService categoryService,
                           ICurrencyService currencyService,
                           ICustomerService customerService,
                           IForumService forumService,
                           IGenericAttributeService genericAttributeService,
                           IHostingEnvironment hostingEnvironment,
                           ILanguageService languageService,
                           ILocalizationService localizationService,
                           IManufacturerService manufacturerService,
                           INopFileProvider fileProvider,
                           IPageHeadBuilder pageHeadBuilder,
                           IPermissionService permissionService,
                           IPictureService pictureService,
                           IProductService productService,
                           IProductTagService productTagService,
                           ISitemapGenerator sitemapGenerator,
                           IStaticCacheManager cacheManager,
                           IStoreContext storeContext,
                           IThemeContext themeContext,
                           IThemeProvider themeProvider,
                           ITopicService topicService,
                           IUrlHelperFactory urlHelperFactory,
                           IUrlRecordService urlRecordService,
                           IWebHelper webHelper,
                           IWorkContext workContext,
                           LocalizationSettings localizationSettings,
                           NewsSettings newsSettings,
                           StoreInformationSettings storeInformationSettings,
                           VendorSettings vendorSettings)
 {
     this._blogSettings     = blogSettings;
     this._captchaSettings  = captchaSettings;
     this._catalogSettings  = catalogSettings;
     this._commonSettings   = commonSettings;
     this._customerSettings = customerSettings;
     this._displayDefaultFooterItemSettings = displayDefaultFooterItemSettings;
     this._forumSettings           = forumSettings;
     this._actionContextAccessor   = actionContextAccessor;
     this._categoryService         = categoryService;
     this._currencyService         = currencyService;
     this._customerService         = customerService;
     this._forumService            = forumService;
     this._genericAttributeService = genericAttributeService;
     this._hostingEnvironment      = hostingEnvironment;
     this._languageService         = languageService;
     this._localizationService     = localizationService;
     this._manufacturerService     = manufacturerService;
     this._fileProvider            = fileProvider;
     this._pageHeadBuilder         = pageHeadBuilder;
     this._permissionService       = permissionService;
     this._pictureService          = pictureService;
     this._productService          = productService;
     this._productTagService       = productTagService;
     this._sitemapGenerator        = sitemapGenerator;
     this._cacheManager            = cacheManager;
     this._storeContext            = storeContext;
     this._themeContext            = themeContext;
     this._themeProvider           = themeProvider;
     this._topicService            = topicService;
     this._urlHelperFactory        = urlHelperFactory;
     this._urlRecordService        = urlRecordService;
     this._webHelper                = webHelper;
     this._workContext              = workContext;
     this._localizationSettings     = localizationSettings;
     this._newsSettings             = newsSettings;
     this._storeInformationSettings = storeInformationSettings;
     this._vendorSettings           = vendorSettings;
 }
示例#56
0
        public PurchaseOrderBillPageViewModel(INavigationService navigationService,
                                              IProductService productService,
                                              IUserService userService,
                                              ITerminalService terminalService,
                                              IWareHousesService wareHousesService,
                                              IAccountingService accountingService,
                                              IPurchaseBillService purchaseBillService,
                                              IManufacturerService manufacturerService,
                                              IMicrophoneService microphoneService,
                                              IDialogService dialogService
                                              ) : base(navigationService, productService, terminalService, userService, wareHousesService, accountingService, dialogService)
        {
            Title = "采购单";

            _purchaseBillService = purchaseBillService;
            _manufacturerService = manufacturerService;

            _microphoneService = microphoneService;


            InitBill();


            //验证
            var valid_IsReversed     = this.ValidationRule(x => x.Bill.ReversedStatus, _isBool, "已红冲单据不能操作");
            var valid_IsAudited      = this.ValidationRule(x => x.Bill.AuditedStatus, _isBool, "已审核单据不能操作");
            var valid_ManufacturerId = this.ValidationRule(x => x.Bill.ManufacturerId, _isZero, "供应商未指定");
            var valid_WareHouseId    = this.ValidationRule(x => x.Bill.WareHouseId, _isZero, "仓库未指定");
            var valid_ProductCount   = this.ValidationRule(x => x.Bill.Items.Count, _isZero, "请添加商品项目");
            var valid_SelectesCount  = this.ValidationRule(x => x.PaymentMethods.Selectes.Count, _isZero, "请选择支付方式");


            //初始化
            this.Load = ReactiveCommand.CreateFromTask(() => Task.Run(async() =>
            {
                var whs = await _wareHousesService.GetWareHousesAsync(this.BillType, force: true);
                if (whs != null && whs.FirstOrDefault() != null)
                {
                    var wh = whs.FirstOrDefault();
                    if (Bill.WareHouseId == 0)
                    {
                        WareHouse        = wh;
                        Bill.WareHouseId = wh.Id;
                    }

                    if (string.IsNullOrEmpty(Bill.WareHouseName))
                    {
                        Bill.WareHouseName = wh.Name;
                    }
                }

                var result = await _purchaseBillService.GetInitDataAsync(calToken: new System.Threading.CancellationToken());
                if (result != null)
                {
                    var defaultAccs = result.PurchaseBillAccountings.Select(s => new AccountingModel()
                    {
                        Default              = true,
                        AccountingOptionId   = s.AccountingOptionId,
                        AccountingOptionName = s.AccountingOptionName,
                        AccountCodeTypeId    = s.AccountCodeTypeId,
                        Name = s.Name
                    }).ToList();

                    PaymentMethods.Selectes = new ObservableCollection <AccountingModel>(defaultAccs);
                }
            }));

            //提交单据
            this.SubmitDataCommand = ReactiveCommand.CreateFromTask <object, Unit>(async _ =>
            {
                //await this.Access(AccessGranularityEnum.PurchaseBillsSave);

                return(await this.Access(AccessGranularityEnum.PurchaseBillsSave, async() =>
                {
                    if (this.Bill.ReversedStatus)
                    {
                        _dialogService.ShortAlert("已红冲单据不能操作");
                        return Unit.Default;
                    }

                    if (this.Bill.AuditedStatus)
                    {
                        _dialogService.ShortAlert("已审核单据不能操作");
                        return Unit.Default;
                    }

                    var dateTime = UtcHelper.ConvertDateTimeInt(DateTime.Now.ToUniversalTime());

                    if (Bill.BusinessUserId == 0)
                    {
                        Bill.BusinessUserId = Settings.UserId;
                    }

                    var postMData = new PurchaseItemUpdateModel()
                    {
                        BillNumber = this.Bill.BillNumber,
                        //供应商
                        ManufacturerId = Bill.ManufacturerId,
                        //业务员
                        BusinessUserId = Bill.BusinessUserId,
                        //仓库
                        WareHouseId = Bill.WareHouseId,
                        //交易日期
                        //TransactionDate = DateTime.Now,
                        TransactionDate = dateTime,
                        //按最小单位采购
                        IsMinUnitPurchase = true,
                        //备注
                        Remark = Bill.Remark,
                        //优惠金额
                        PreferentialAmount = Bill.PreferentialAmount,
                        //优惠后金额
                        PreferentialEndAmount = Bill.SumAmount - Bill.PreferentialAmount,
                        //欠款金额
                        OweCash = Bill.OweCash,
                        //商品项目(保存量大于零的商品)
                        Items = Bill.Items?.Where(i => i.Quantity > 0).ToList(),
                        //收款账户
                        Accounting = PaymentMethods.Selectes.Select(a =>
                        {
                            return new AccountMaping()
                            {
                                AccountingOptionId = a.AccountingOptionId,
                                CollectionAmount = a.CollectionAmount,
                                Name = a.Name,
                                BillId = 0,
                            };
                        }).ToList()
                    };

                    return await SubmitAsync(postMData, Bill.Id, _purchaseBillService.CreateOrUpdateAsync, (result) =>
                    {
                        Bill = new PurchaseBillModel();
                    }, token: new System.Threading.CancellationToken());
                }));
            },
                                                                                   this.IsValid());

            //存储记录
            this.SaveCommand = ReactiveCommand.Create <object>(async e =>
            {
                var c1 = this.Bill.ManufacturerId != 0 && this.Bill.ManufacturerId != (Settings.PurchaseBill?.ManufacturerId ?? 0);
                var c3 = this.Bill.WareHouseId != 0 && this.Bill.WareHouseId != (Settings.PurchaseBill?.WareHouseId ?? 0);
                var c4 = this.Bill.Items?.Count != (Settings.PurchaseBill?.Items?.Count ?? 0);
                if (!this.Bill.AuditedStatus && (c1 || c3 || c4))
                {
                    if (!this.Bill.AuditedStatus && !this.Bill.IsSubmitBill)
                    {
                        var ok = await _dialogService.ShowConfirmAsync("你是否要保存单据?", "提示", "确定", "取消");
                        if (ok)
                        {
                            Settings.PurchaseBill = this.Bill;
                        }
                        else
                        {
                            await _navigationService.GoBackAsync();
                        }
                    }
                }
                else
                {
                    await _navigationService.GoBackAsync();
                }
            });

            //商品编辑
            this.ItemSelectedCommand = ReactiveCommand.Create <CollectionView>(async e =>
            {
                if (this.Bill.ReversedStatus)
                {
                    _dialogService.ShortAlert("已红冲单据不能操作");
                    return;
                }

                if (this.Bill.AuditedStatus)
                {
                    _dialogService.ShortAlert("已审核单据不能操作");
                    return;
                }

                if (this.Bill.IsSubmitBill)
                {
                    _dialogService.ShortAlert("已提交的单据不能编辑");
                    return;
                }

                if (e.SelectedItem != null)
                {
                    var item = Selecter;
                    if (item != null)
                    {
                        var product = ProductSeries.Select(p => p).Where(p => p.Id == item.ProductId).FirstOrDefault();
                        if (product != null)
                        {
                            product.UnitId   = item.UnitId;
                            product.Quantity = item.Quantity;
                            product.Price    = item.Price;
                            product.Amount   = item.Amount;
                            product.Remark   = item.Remark;
                            product.Subtotal = item.Subtotal;
                            product.UnitName = item.UnitName;
                            product.GUID     = item.GUID;
                            if (item.BigUnitId > 0)
                            {
                                product.bigOption.Name        = item.UnitName;
                                product.BigPriceUnit.Quantity = item.Quantity;
                                product.BigPriceUnit.UnitId   = item.BigUnitId ?? 0;
                                product.BigPriceUnit.Amount   = item.Amount;
                                product.BigPriceUnit.Remark   = item.Remark;
                            }

                            if (item.SmallUnitId > 0)
                            {
                                product.bigOption.Name          = item.UnitName;
                                product.SmallPriceUnit.Quantity = item.Quantity;
                                product.SmallPriceUnit.UnitId   = item.SmallUnitId ?? 0;
                                product.SmallPriceUnit.Amount   = item.Amount;
                                product.SmallPriceUnit.Remark   = item.Remark;
                            }

                            await this.NavigateAsync("EditProductPage", ("Product", product), ("Reference", PageName), ("Item", item), ("WareHouse", WareHouse));
                        }
                    }
                }
            });

            //添加商品
            this.AddProductCommand = ReactiveCommand.Create <object>(async e =>
            {
                if (!valid_IsAudited.IsValid)
                {
                    _dialogService.ShortAlert("已审核单据不能操作!");
                    return;
                }

                if (!valid_ManufacturerId.IsValid)
                {
                    _dialogService.ShortAlert("请选择供应商!");
                    ((ICommand)ManufacturerSelected)?.Execute(null);
                    return;
                }

                if (!valid_WareHouseId.IsValid || WareHouse == null)
                {
                    _dialogService.ShortAlert("请选择仓库!");
                    ((ICommand)StockSelected)?.Execute(null);
                    return;
                }

                await this.NavigateAsync("SelectProductPage", ("Reference", this.PageName),
                                         ("WareHouse", WareHouse),
                                         ("ManufacturerId", Bill.ManufacturerId),
                                         ("SerchKey", Filter.SerchKey));
            });

            //审核
            this.AuditingDataCommand = ReactiveCommand.CreateFromTask <object>(async _ =>
            {
                //是否具有审核权限
                await this.Access(AccessGranularityEnum.PurchaseBillsApproved);
                await SubmitAsync(Bill.Id, _purchaseBillService.AuditingAsync, async(result) =>
                {
                    //红冲审核水印
                    this.Bill.AuditedStatus = true;

                    var _conn = App.Resolve <ILiteDbService <MessageInfo> >();
                    var ms    = await _conn.Table.FindByIdAsync(SelecterMessage.Id);
                    if (ms != null)
                    {
                        ms.IsRead = true;
                        await _conn.UpsertAsync(ms);
                    }
                });
            }, this.WhenAny(x => x.Bill.Id, (x) => x.GetValue() > 0));

            //启用麦克风
            this.WhenAnyValue(x => x.EnableMicrophone)
            .Subscribe(async x =>
            {
                var micAccessGranted = await _microphoneService.GetPermissionsAsync();
                if (!micAccessGranted)
                {
                    this.Alert("请打开麦克风");
                }
            }).DisposeWith(DeactivateWith);
            //匹配声音
            this.RecognitionCommand = ReactiveCommand.Create(() =>
            {
                if (!valid_ManufacturerId.IsValid)
                {
                    _dialogService.ShortAlert("请选择供应商!");
                    return;
                }

                if (!valid_WareHouseId.IsValid)
                {
                    _dialogService.ShortAlert("请选择仓库!");
                    return;
                }

                RecognitionSpeech((key) =>
                {
                    Filter.SerchKey = key;
                    ((ICommand)this.AddProductCommand)?.Execute(null);
                });
            });

            //切换语音助手
            this.SpeechCommand = ReactiveCommand.Create(() =>
            {
                if (IsFooterVisible)
                {
                    IsVisible       = true;
                    IsExpanded      = true;
                    IsFooterVisible = false;
                }
                else
                {
                    IsVisible       = false;
                    IsExpanded      = false;
                    IsFooterVisible = true;
                }
            });

            //工具栏打印
            this.PrintCommand = ReactiveCommand.Create(async() =>
            {
                if (Bill.Items.Count == 0)
                {
                    Alert("请添加商品项目");
                    return;
                }
                Bill.BillType = BillTypeEnum.PurchaseBill;
                await SelectPrint(Bill);
            });

            //绑定页面菜单
            _popupMenu = new PopupMenu(this, new Dictionary <MenuEnum, Action <SubMenu, ViewModelBase> >
            {
                //支付方式
                { MenuEnum.PAY, (m, vm) => {
                      if (Bill.SumAmount == 0)
                      {
                          this.Alert("请添加商品项目!"); return;
                      }
                      PaymentMethodBaseModel payments = this.PaymentMethods;
                      SelectPaymentMethods(("PaymentMethods", payments),
                                           ("TBalance", this.TBalance),
                                           ("BillType", this.BillType),
                                           ("Reference", PageName));
                  } },
 public ManufacturerController(IManufacturerService manufacturerService)
 {
     _manufacturerService = manufacturerService;
 }
示例#58
0
        public CommonController(ICategoryService categoryService,
                                IProductService productService,
                                IManufacturerService manufacturerService,
                                ITopicService topicService,
                                ILanguageService languageService,
                                ICurrencyService currencyService,
                                ILocalizationService localizationService,
                                IWorkContext workContext,
                                IStoreContext storeContext,
                                IQueuedEmailService queuedEmailService,
                                IEmailAccountService emailAccountService,
                                ISitemapGenerator sitemapGenerator,
                                IThemeContext themeContext,
                                IThemeProvider themeProvider,
                                IForumService forumService,
                                IGenericAttributeService genericAttributeService,
                                IWebHelper webHelper,
                                IPermissionService permissionService,
                                ICacheManager cacheManager,
                                ICustomerActivityService customerActivityService,
                                IVendorService vendorService,
                                CustomerSettings customerSettings,
                                TaxSettings taxSettings,
                                CatalogSettings catalogSettings,
                                StoreInformationSettings storeInformationSettings,
                                EmailAccountSettings emailAccountSettings,
                                CommonSettings commonSettings,
                                BlogSettings blogSettings,
                                NewsSettings newsSettings,
                                ForumSettings forumSettings,
                                LocalizationSettings localizationSettings,
                                CaptchaSettings captchaSettings,
                                VendorSettings vendorSettings)
        {
            this._categoryService         = categoryService;
            this._productService          = productService;
            this._manufacturerService     = manufacturerService;
            this._topicService            = topicService;
            this._languageService         = languageService;
            this._currencyService         = currencyService;
            this._localizationService     = localizationService;
            this._workContext             = workContext;
            this._storeContext            = storeContext;
            this._queuedEmailService      = queuedEmailService;
            this._emailAccountService     = emailAccountService;
            this._sitemapGenerator        = sitemapGenerator;
            this._themeContext            = themeContext;
            this._themeProvider           = themeProvider;
            this._forumservice            = forumService;
            this._genericAttributeService = genericAttributeService;
            this._webHelper               = webHelper;
            this._permissionService       = permissionService;
            this._cacheManager            = cacheManager;
            this._customerActivityService = customerActivityService;
            this._vendorService           = vendorService;

            this._customerSettings         = customerSettings;
            this._taxSettings              = taxSettings;
            this._catalogSettings          = catalogSettings;
            this._storeInformationSettings = storeInformationSettings;
            this._emailAccountSettings     = emailAccountSettings;
            this._commonSettings           = commonSettings;
            this._blogSettings             = blogSettings;
            this._newsSettings             = newsSettings;
            this._forumSettings            = forumSettings;
            this._localizationSettings     = localizationSettings;
            this._captchaSettings          = captchaSettings;
            this._vendorSettings           = vendorSettings;
        }
示例#59
0
 public ManufacturersViewComponent(IManufacturerService manufacturerService)
 {
     this.manufacturerService = manufacturerService;
 }
示例#60
0
 public ElasticsearchController(IManufacturerService studentService, ITradeService tradeService)
 {
     _manufacturerService = studentService;
     _tradeService        = tradeService;
 }