Esempio n. 1
0
        public BusinessUnitService(IKenticoBusinessUnitsProvider kenticoBusinessUnits, IShoppingCartProvider shoppingCartProvider)
        {
            if (kenticoBusinessUnits == null)
            {
                throw new ArgumentNullException(nameof(kenticoBusinessUnits));
            }

            if (shoppingCartProvider == null)
            {
                throw new ArgumentNullException(nameof(shoppingCartProvider));
            }
            this.kenticoBusinessUnits = kenticoBusinessUnits;
            _shoppingCartProvider     = shoppingCartProvider;
        }
Esempio n. 2
0
 /// <summary>
 /// Page load event
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         _shoppingCart = DIContainer.Resolve <IShoppingCartProvider>();
         _businessUnit = DIContainer.Resolve <IKenticoBusinessUnitsProvider>();
         if (AuthenticationHelper.IsAuthenticated() && !IsPostBack)
         {
             int campaignID = QueryHelper.GetInteger("campid", 0);
             if (campaignID > 0)
             {
                 BindData(campaignID);
             }
         }
     }
     catch (Exception ex)
     {
         EventLogProvider.LogInformation("Kadena_CMSWebParts_Kadena_Cart_FailedOrdersCart", "Page_Load", ex.Message);
     }
 }
Esempio n. 3
0
        public OrderDetailService(IMapper mapper,
                                  IOrderViewClient orderViewClient,
                                  IMailingListClient mailingClient,
                                  IKenticoOrderProvider kenticoOrder,
                                  IShoppingCartProvider shoppingCart,
                                  IKenticoProductsProvider products,
                                  IKenticoUserProvider kenticoUsers,
                                  IKenticoResourceService resources,
                                  IKenticoLogger kenticoLog,
                                  IKenticoLocalizationProvider localization,
                                  IKenticoPermissionsProvider permissions,
                                  IKenticoBusinessUnitsProvider businessUnits
                                  )
        {
            if (mapper == null)
            {
                throw new ArgumentNullException(nameof(mapper));
            }
            if (orderViewClient == null)
            {
                throw new ArgumentNullException(nameof(orderViewClient));
            }
            if (mailingClient == null)
            {
                throw new ArgumentNullException(nameof(mailingClient));
            }
            if (kenticoOrder == null)
            {
                throw new ArgumentNullException(nameof(kenticoOrder));
            }
            if (shoppingCart == null)
            {
                throw new ArgumentNullException(nameof(shoppingCart));
            }
            if (products == null)
            {
                throw new ArgumentNullException(nameof(products));
            }
            if (kenticoUsers == null)
            {
                throw new ArgumentNullException(nameof(kenticoUsers));
            }
            if (resources == null)
            {
                throw new ArgumentNullException(nameof(resources));
            }
            if (kenticoLog == null)
            {
                throw new ArgumentNullException(nameof(kenticoLog));
            }
            if (localization == null)
            {
                throw new ArgumentNullException(nameof(localization));
            }
            if (permissions == null)
            {
                throw new ArgumentNullException(nameof(permissions));
            }
            if (businessUnits == null)
            {
                throw new ArgumentNullException(nameof(businessUnits));
            }

            this.mapper          = mapper;
            this.orderViewClient = orderViewClient;
            this.kenticoOrder    = kenticoOrder;
            this.shoppingCart    = shoppingCart;
            this.products        = products;
            this.kenticoUsers    = kenticoUsers;
            this.resources       = resources;
            this.mailingClient   = mailingClient;
            this.kenticoLog      = kenticoLog;
            this.localization    = localization;
            this.permissions     = permissions;
            this.businessUnits   = businessUnits;
        }