Beispiel #1
0
 public DiscountFacade(IUnitOfWork unitOfWork, IDiscountDataService discountDataService, IProductDataService productDataService, IProductCategoryDataService productCategoryDataService)
 {
     _unitOfWork                 = unitOfWork;
     _discountDataService        = discountDataService;
     _productDataService         = productDataService;
     _productCategoryDataService = productCategoryDataService;
 }
 public DataFillerService(
     IProductCategoryDataService productCategoryDataService,
     IProductDataService productDataService,
     IProductCodeDataService productCodeDataService)
 {
     _productCategoryDataService = productCategoryDataService;
     _productDataService = productDataService;
     _productCodeDataService = productCodeDataService;
 }
Beispiel #3
0
 public MenuItemUrlResolver(ICmsUrlBuilderFactory cmsUrlBuilderFactory, IPageDataService pageDataService, IEntityDataService entityDataService, IUserDataService userDataService, ICategoryDataService categoryDataService, IProductDataService productDataService, IProductCategoryDataService productCategoryDataService)
 {
     _cmsUrlBuilderFactory       = cmsUrlBuilderFactory;
     _pageDataService            = pageDataService;
     _entityDataService          = entityDataService;
     _userDataService            = userDataService;
     _categoryDataService        = categoryDataService;
     _productDataService         = productDataService;
     _productCategoryDataService = productCategoryDataService;
 }
 public DiscountValidator(IDiscountDataService discountDataService,
                          IDiscountUsageDataService discountUsageDataService, IWorkContext workContext,
                          IIdentityManager identityManager, IProductCategoryDataService productCategoryDataService,
                          IProductDataService productDataService)
 {
     _discountDataService      = discountDataService;
     _discountUsageDataService = discountUsageDataService;
     _workContext                = workContext;
     _identityManager            = identityManager;
     _productCategoryDataService = productCategoryDataService;
     _productDataService         = productDataService;
 }
Beispiel #5
0
 public DiscountWebClientService(IDiscountDataService discountDataService,
                                 ICurrentUserService currentUserService,
                                 IProductDataService productDataService, IProductCategoryDataService productCategoryDataService,
                                 IDiscountValidator discountValidator, IUnitOfWork unitOfWork)
 {
     _discountDataService        = discountDataService;
     _currentUserService         = currentUserService;
     _productDataService         = productDataService;
     _productCategoryDataService = productCategoryDataService;
     _discountValidator          = discountValidator;
     _unitOfWork            = unitOfWork;
     _discountApplierHelper = new DiscountApplierHelper();
 }
 public ProductFacade(IEntityBuilder <Product, ProductCategory> builder, IEntitySchemeDataService schemes,
                      IProductCategoryDataService productCategories, IProductDataService products, IDiscountDataService discounts,
                      IUnitOfWork unitOfWork, IFileDataDataService files,
                      List <IBaseBeforeUpdatingEntityLogic> baseBeforeUpdateEntityLogics, IIdentityManager identityManager)
 {
     _builder                      = builder;
     _schemes                      = schemes;
     _productCategories            = productCategories;
     _products                     = products;
     _discounts                    = discounts;
     _unitOfWork                   = unitOfWork;
     _files                        = files;
     _baseBeforeUpdateEntityLogics = baseBeforeUpdateEntityLogics;
     _identityManager              = identityManager;
 }
        public DataInitializerService(
            IProduct_ProductCategoryDataService productProductCategoryDataService,
            IProductCategoryDataService productCategoryDataService,
            IProductDataService productDataService,
            IProductCodeDataService productCodeDataService,
			IProductPriceDataService productPriceDataService)
        {
            ToInit = new List<IHaveInit> {
                productProductCategoryDataService,
                productCategoryDataService,
                productDataService,
                productCodeDataService,
                productPriceDataService
            };
        }
 public ProductService(List <IBaseBeforeAddingEntityLogic> baseBeforeAddingEntityLogics,
                       List <BaseAfterAddingEntityLogic> baseAfterAddingEntityLogics,
                       List <IBaseAfterUpdatingEntityLogic> baseAfterUpdateEntityLogics,
                       List <IBaseBeforeUpdatingEntityLogic> baseBeforeUpdateEntityLogics,
                       List <IBaseBeforeDeleteEntityLogic> baseBeforeDeleteEntityLogics,
                       List <BaseAfterDeleteEntityLogic> baseAfterDeleteEntityLogics, IIdentityManager identityManager,
                       IRestrictedItemAccessManager accessManager,
                       IProductDataService productDataService, IProductFacade productFacade, IUnitOfWork unitOfWork, IEntitySchemeDataService schemeDataService, IProductCategoryDataService productCategoryDataService) : base(baseBeforeAddingEntityLogics, baseAfterAddingEntityLogics,
                                                                                                                                                                                                                                baseAfterUpdateEntityLogics, baseBeforeUpdateEntityLogics, baseBeforeDeleteEntityLogics,
                                                                                                                                                                                                                                baseAfterDeleteEntityLogics, identityManager, accessManager, productDataService)
 {
     _productDataService         = productDataService;
     _productFacade              = productFacade;
     _unitOfWork                 = unitOfWork;
     _schemeDataService          = schemeDataService;
     _productCategoryDataService = productCategoryDataService;
 }
Beispiel #9
0
 public ProductCategoryService(List <IBaseBeforeAddingEntityLogic> baseBeforeAddingEntityLogics,
                               List <BaseAfterAddingEntityLogic> baseAfterAddingEntityLogics,
                               List <IBaseAfterUpdatingEntityLogic> baseAfterUpdateEntityLogics,
                               List <IBaseBeforeUpdatingEntityLogic> baseBeforeUpdateEntityLogics,
                               List <IBaseBeforeDeleteEntityLogic> baseBeforeDeleteEntityLogics,
                               List <BaseAfterDeleteEntityLogic> baseAfterDeleteEntityLogics, IIdentityManager identityManager,
                               IRestrictedItemAccessManager accessManager, IProductCategoryDataService categoryData,
                               IUnitOfWork unitOfWork, IFieldDefentionFacade fieldDefentionFacade, IMetaDataDataService metaDataService,
                               IProductDataService productDataService) : base(
         baseBeforeAddingEntityLogics, baseAfterAddingEntityLogics, baseAfterUpdateEntityLogics,
         baseBeforeUpdateEntityLogics, baseBeforeDeleteEntityLogics, baseAfterDeleteEntityLogics, identityManager,
         accessManager, categoryData)
 {
     _categoryData         = categoryData;
     _unitOfWork           = unitOfWork;
     _fieldDefentionFacade = fieldDefentionFacade;
     _metaDataService      = metaDataService;
     _productDataService   = productDataService;
 }
Beispiel #10
0
 public ProductWebClientService(IProductDataService productDataService,
                                IRestrictedItemAccessManager accessManager, IProductCategoryDataService productCategoryDataService,
                                IWorkContext workContext, IUnitOfWork unitOfWork, IProductReviewDataService productReviewDataService,
                                ISecurityLogger securityLogger, IOrderDataService orderDataService, ShoppingCartHelper shoppingCartHelper,
                                IDiscountWebClientService discountWebClientService, ITagDataService tagDataService,
                                ISettingService settingService, IIdentityManager identityManager,
                                IEntitySchemeDataService schemeDataService)
 {
     _productDataService         = productDataService;
     _accessManager              = accessManager;
     _productCategoryDataService = productCategoryDataService;
     _workContext = workContext;
     _unitOfWork  = unitOfWork;
     _productReviewDataService = productReviewDataService;
     _securityLogger           = securityLogger;
     _orderDataService         = orderDataService;
     _discountWebClientService = discountWebClientService;
     _tagDataService           = tagDataService;
     _settingService           = settingService;
     _identityManager          = identityManager;
     _schemeDataService        = schemeDataService;
     _currUserId = new Lazy <Guid>(_identityManager.GetCurrentIdentity().GetUserId().ToGuid);
 }
 public ProductCategoryWidget()
 {
     _productDataService  = Container.GetInstance <IProductDataService>();
     _categoryDataService = Container.GetInstance <IProductCategoryDataService>();
 }
Beispiel #12
0
        public static List <ProductCategory> GetAllDiscountAppliedCategories(this Discount discount, IProductCategoryDataService productCategoryDataService)
        {
            if (discount.AppliedToSubCategories)
            {
                var parentCategories = productCategoryDataService.Query
                                       .Where(x => x.AppliedDiscounts.Any(d => d.Id == discount.Id)).ToList();
                var childCategoris = new List <ProductCategory>();
                foreach (var parentCategory in parentCategories)
                {
                    childCategoris.AddRange(
                        productCategoryDataService.GetAllCategoriesByParentProductCategories(parentCategory.Id));
                }
                parentCategories.AddRange(childCategoris);
                return(parentCategories);
            }

            discount.AppliedToCategories = productCategoryDataService.Query
                                           .Where(x => x.AppliedDiscounts.Any(d => d.Id == discount.Id)).ToList();
            return(discount.AppliedToCategories.ToList());
        }
 public ProductCategoryListViewModel(IProductCategoryDataService productCategoryDataService)
 {
     _productCategoryDataService = productCategoryDataService;
     ProductCategories = new ObservableCollection<ProductCategory>(
         _productCategoryDataService.GetAll());
 }