public HomeController(IObjectFactory objectFactory)
 {
     _userViewService     = objectFactory.Create <IUserViewService>();
     _productViewService  = objectFactory.Create <IProductViewService>();
     _groupViewService    = objectFactory.Create <IProductGroupViewService>();
     _categoryViewService = objectFactory.Create <IProductCategoryViewService>();
 }
 public ProductViewController(IProductViewService productViewService, IProductService productService, IAccountService accountService, IUserService userService, ISupplierService supplierService, IDataContext context) : base(context)
 {
     this.productViewService = productViewService;
     this.userService        = userService;
     this.supplierService    = supplierService;
     this.productService     = productService;
     this.accountService     = accountService;
 }
 public CartController(IObjectFactory objectFactory)
 {
     _productViewService   = objectFactory.Create <IProductViewService>();
     _orderTypeViewService = objectFactory.Create <IOrderTypeViewService>();
     _orderModifyService   = objectFactory.Create <IOrderModifyService>();
     _orderViewService     = objectFactory.Create <IOrderViewService>();
     _userViewService      = objectFactory.Create <IUserViewService>();
     _userModifyService    = objectFactory.Create <IUserModifyService>();
     cart        = new Cart();
     currentUser = new UserViewModel();
 }
Esempio n. 4
0
 /// <summary>
 /// Ctor
 /// </summary>
 /// <param name="httpContext">HTTP context</param>
 /// <param name="productService">Product service</param>
 /// <param name="catalogSettings">Catalog settings</param>
 public RecentlyViewedProductsService(HttpContextBase httpContext, IProductService productService,
                                      CatalogSettings catalogSettings,
                                      IWorkContext workContext,
                                      IProductViewService productViewService)
 {
     this._httpContext        = httpContext;
     this._productService     = productService;
     this._catalogSettings    = catalogSettings;
     this._workContext        = workContext;
     this._productViewService = productViewService;
 }
Esempio n. 5
0
 public BasicController(ISubCompanyViewService subCompanyViewService, IDepartmentViewService departmentViewService, IEmployeeViewService employeeViewService, IClientViewService clientViewService,
                        IStorageViewService storageViewService, IUnitViewService unitViewService, IProductViewService productViewService)
 {
     this.mSubCompanyViewService = subCompanyViewService;
     this.mDepartmentViewService = departmentViewService;
     this.mEmployeeViewService   = employeeViewService;
     this.mClientViewService     = clientViewService;
     this.mStorageViewService    = storageViewService;
     this.mUnitViewService       = unitViewService;
     this.mProductViewService    = productViewService;
 }
 public ProductController(
     IProductPriceViewService productPriceViewService,
     IComposerContext composerContext,
     IProductViewService productViewService,
     IRelatedProductViewService relatedProductViewService)
 {
     ProductPriceViewService   = productPriceViewService ?? throw new ArgumentNullException(nameof(productPriceViewService));
     ComposerContext           = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
     ProductViewService        = productViewService ?? throw new ArgumentNullException(nameof(productViewService));
     RelatedProductViewService = relatedProductViewService ?? throw new ArgumentNullException(nameof(relatedProductViewService));
 }
        public ProductContext(
            IComposerContext composerContext,
            IProductViewService productService,
            HttpRequestBase request,
            Lazy <IPreviewModeService> previewModeService)
        {
            ComposerContext    = composerContext ?? throw new ArgumentNullException(nameof(composerContext));
            ProductService     = productService ?? throw new ArgumentNullException(nameof(productService));
            Request            = request ?? throw new ArgumentNullException(nameof(request));
            PreviewModeService = previewModeService ?? throw new ArgumentNullException(nameof(previewModeService));

            _viewModel = new Lazy <ProductViewModel>(() => GetProductViewModelAsync().Result, true);
        }
Esempio n. 8
0
 public CompanyController(ICompanyInformationService companyInformationService,
                          ICustomerService customerService,
                          IWorkContext workContext,
                          IPictureService pictureService,
                          IGenericAttributeService genericAttributeService,
                          INewsService newsService,
                          IProductViewService productViewService,
                          ICompanyInformationViewService companyinformationViewService,
                          IProductService productService,
                          NewsSettings newsSettings,
                          CatalogSettings catalogSettings)
 {
     this._companyInformationService = companyInformationService;
     this._customerService           = customerService;
     this._workContext                   = workContext;
     this._pictureSerice                 = pictureService;
     this._genericAttibuteService        = genericAttributeService;
     this._newsService                   = newsService;
     this._productViewService            = productViewService;
     this._productService                = productService;
     this._companyinformationViewService = companyinformationViewService;
     this._newsSettings                  = newsSettings;
     this._catalogSettings               = catalogSettings;
 }
Esempio n. 9
0
 public ProductController(IObjectFactory objectFactory)
 {
     _productViewService   = objectFactory.Create <IProductViewService>();
     _productModifyService = objectFactory.Create <IProductModifyService>();
     _groupViewService     = objectFactory.Create <IProductGroupViewService>();
 }