Beispiel #1
0
 public RewardController(IOrderService orderService,
                         ICacheManager cacheManager,
                         IProductService productService,
                         ISettingService settingService,
                         ICustomerAttributeService customerAttributeService,
                         ICustomerService customerService,
                         IShopppingCartService cartService,
                         ICustomerAddressService addressService,
                         IProductAttributeService attributeService,
                         IPaymentRecordService recordService,
                         ICustomerRewardService rewardService,
                         IProductImagesService imageService,
                         IUnitOfWorkManager unitOfWorkManager)
 {
     this._orderService             = orderService;
     this._cacheManager             = cacheManager;
     this._productService           = productService;
     this._settingService           = settingService;
     this._customerAttributeService = customerAttributeService;
     this._cartService       = cartService;
     this._customerService   = customerService;
     this._addressService    = addressService;
     this._attributeService  = attributeService;
     this._recordService     = recordService;
     this._rewardService     = rewardService;
     this._imageService      = imageService;
     this._unitOfWorkManager = unitOfWorkManager;
 }
Beispiel #2
0
 public ShopCartController(IProductService productService, IOrderProcessorService orderService,
                           ISalesTerritoryService salesService, IShopCartItemService shopCartItemService, ICustomerAddressService addressService)
 {
     this.productService      = productService;
     this.orderService        = orderService;
     this.salesService        = salesService;
     this.shopCartItemService = shopCartItemService;
     this.addressService      = addressService;
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomerApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        /// <param name="memberService">
        /// The member Service.
        /// </param>
        public CustomerApiController(IMerchelloContext merchelloContext, IMemberService memberService)
            : base((MerchelloContext)merchelloContext)
        {
            Mandate.ParameterNotNull(merchelloContext, "merchelloContext");
            Mandate.ParameterNotNull(memberService, "memberService");

            _customerService        = merchelloContext.Services.CustomerService;
            _customerAddressService = ((Core.Services.ServiceContext)merchelloContext.Services).CustomerAddressService;
            _memberService          = memberService;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomerApiController"/> class.
        /// </summary>
        /// <param name="merchelloContext">
        /// The merchello context.
        /// </param>
        /// <param name="memberService">
        /// The member Service.
        /// </param>
        public CustomerApiController(IMerchelloContext merchelloContext, IMemberService memberService)
            : base((MerchelloContext)merchelloContext)
        {
            Mandate.ParameterNotNull(merchelloContext, "merchelloContext");
            Mandate.ParameterNotNull(memberService, "memberService");

            _customerService = merchelloContext.Services.CustomerService;
            _customerAddressService = ((Core.Services.ServiceContext)merchelloContext.Services).CustomerAddressService;
            _memberService = memberService;
        }
Beispiel #5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerService"/> class.
 /// </summary>
 /// <param name="provider">
 /// The provider.
 /// </param>
 /// <param name="repositoryFactory">
 /// The repository factory.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 /// <param name="anonymousCustomerService">
 /// The anonymous Customer Service.
 /// </param>
 /// <param name="customerAddressService">
 /// The customer Address Service.
 /// </param>
 /// <param name="invoiceService">
 /// The invoice Service.
 /// </param>
 /// <param name="paymentService">
 /// The payment Service.
 /// </param>
 public CustomerService(
     IDatabaseUnitOfWorkProvider provider,
     RepositoryFactory repositoryFactory,
     ILogger logger,
     IAnonymousCustomerService anonymousCustomerService,
     ICustomerAddressService customerAddressService,
     IInvoiceService invoiceService,
     IPaymentService paymentService)
     : this(provider, repositoryFactory, logger, new TransientMessageFactory(), anonymousCustomerService, customerAddressService, invoiceService, paymentService)
 {
 }
Beispiel #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerService"/> class.
 /// </summary>
 /// <param name="repositoryFactory">
 /// The repository factory.
 /// </param>
 /// <param name="anonymousCustomerService">
 /// The anonymous Customer Service.
 /// </param>
 /// <param name="customerAddressService">
 /// The customer Address Service.
 /// </param>
 /// <param name="invoiceService">
 /// The invoice Service.
 /// </param>
 /// <param name="paymentService">
 /// The payment Service.
 /// </param>
 public CustomerService(
     RepositoryFactory repositoryFactory,
     IAnonymousCustomerService anonymousCustomerService,
     ICustomerAddressService customerAddressService,
     IInvoiceService invoiceService,
     IPaymentService paymentService)
     : this(
         new PetaPocoUnitOfWorkProvider(),
         repositoryFactory,
         anonymousCustomerService,
         customerAddressService,
         invoiceService,
         paymentService)
 {
 }
Beispiel #7
0
        public OrderController(IOrderService orderService,
                               ICacheManager cacheManager,
                               ICustomerService customerService,
                               ICustomerAddressService addressService,

                               IProductAttributeService attributeService,
                               ISettingService settingService)
        {
            this._orderService     = orderService;
            this._cacheManager     = cacheManager;
            this._customerService  = customerService;
            this._addressService   = addressService;
            this._settingService   = settingService;
            this._attributeService = attributeService;
        }
Beispiel #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerService"/> class.
 /// </summary>
 /// <param name="provider">
 /// The provider.
 /// </param>
 /// <param name="repositoryFactory">
 /// The repository factory.
 /// </param>
 /// <param name="logger">
 /// The logger.
 /// </param>
 /// <param name="eventMessagesFactory">
 /// The event messages factory.
 /// </param>
 /// <param name="anonymousCustomerService">
 /// The anonymous customer service.
 /// </param>
 /// <param name="customerAddressService">
 /// The customer address service.
 /// </param>
 /// <param name="invoiceService">
 /// The invoice service.
 /// </param>
 /// <param name="paymentService">
 /// The payment service.
 /// </param>
 public CustomerService(
     IDatabaseUnitOfWorkProvider provider,
     RepositoryFactory repositoryFactory,
     ILogger logger,
     IEventMessagesFactory eventMessagesFactory,
     IAnonymousCustomerService anonymousCustomerService,
     ICustomerAddressService customerAddressService,
     IInvoiceService invoiceService,
     IPaymentService paymentService)
     : base(provider, repositoryFactory, logger, eventMessagesFactory)
 {
     Mandate.ParameterNotNull(anonymousCustomerService, "anonymousCustomerService");
     Mandate.ParameterNotNull(customerAddressService, "customerAddressService");
     Mandate.ParameterNotNull(invoiceService, "invoiceServie");
     Mandate.ParameterNotNull(paymentService, "paymentService");
     _anonymousCustomerService = anonymousCustomerService;
     _customerAddressService   = customerAddressService;
     _invoiceService           = invoiceService;
     _paymentService           = paymentService;
 }
Beispiel #9
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomerService"/> class.
        /// </summary>
        /// <param name="provider">
        /// The provider.
        /// </param>
        /// <param name="repositoryFactory">
        /// The repository factory.
        /// </param>
        /// <param name="anonymousCustomerService">
        /// The anonymous Customer Service.
        /// </param>
        /// <param name="customerAddressService">
        /// The customer Address Service.
        /// </param>
        /// <param name="invoiceService">
        /// The invoice Service.
        /// </param>
        /// <param name="paymentService">
        /// The payment Service.
        /// </param>
        public CustomerService(
            IDatabaseUnitOfWorkProvider provider,
            RepositoryFactory repositoryFactory,
            IAnonymousCustomerService anonymousCustomerService,
            ICustomerAddressService customerAddressService,
            IInvoiceService invoiceService,
            IPaymentService paymentService)
        {
            Mandate.ParameterNotNull(provider, "provider");
            Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
            Mandate.ParameterNotNull(anonymousCustomerService, "anonymousCustomerService");
            Mandate.ParameterNotNull(customerAddressService, "customerAddressService");
            Mandate.ParameterNotNull(invoiceService, "invoiceServie");
            Mandate.ParameterNotNull(paymentService, "paymentService");

            _uowProvider              = provider;
            _repositoryFactory        = repositoryFactory;
            _anonymousCustomerService = anonymousCustomerService;
            _customerAddressService   = customerAddressService;
            _invoiceService           = invoiceService;
            _paymentService           = paymentService;
        }
Beispiel #10
0
 public CustomerAddressesController(ICustomerAddressService customerAddressesService)
 {
     _customerAddressesService = customerAddressesService;
 }
 /// <summary>
 /// The customer address service saved.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="saveEventArgs">
 /// The save event args.
 /// </param>
 public void CustomerAddressServiceSaved(ICustomerAddressService sender, SaveEventArgs <ICustomerAddress> saveEventArgs)
 {
     this.ReIndexCustomers(saveEventArgs.SavedEntities.Select(x => x.Key));
 }
Beispiel #12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CustomerService"/> class.
 /// </summary>
 /// <param name="repositoryFactory">
 /// The repository factory.
 /// </param>
 /// <param name="anonymousCustomerService">
 /// The anonymous Customer Service.
 /// </param>
 /// <param name="customerAddressService">
 /// The customer Address Service.
 /// </param>
 /// <param name="invoiceService">
 /// The invoice Service.
 /// </param>
 /// <param name="paymentService">
 /// The payment Service.
 /// </param>
 public CustomerService(
     RepositoryFactory repositoryFactory, 
     IAnonymousCustomerService anonymousCustomerService, 
     ICustomerAddressService customerAddressService,
     IInvoiceService invoiceService,
     IPaymentService paymentService)
     : this(new PetaPocoUnitOfWorkProvider(), 
     repositoryFactory, 
     anonymousCustomerService, 
     customerAddressService,
     invoiceService,
     paymentService)
 {
 }
        // TODO RSS - come up with another way of updating the customer index ... we should not need to requiry the customer here

        /// <summary>
        /// The customer address service deleted.
        /// </summary>
        /// <param name="sender">
        /// The sender.
        /// </param>
        /// <param name="deleteEventArgs">
        /// The delete event args.
        /// </param>
        public void CustomerAddressServiceDeleted(ICustomerAddressService sender, DeleteEventArgs <ICustomerAddress> deleteEventArgs)
        {
            ReIndexCustomers(deleteEventArgs.DeletedEntities.Select(x => x.Key));
        }
Beispiel #14
0
 /// <summary>
 /// The customer address service saved.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="saveEventArgs">
 /// The save event args.
 /// </param>
 public void CustomerAddressServiceSaved(ICustomerAddressService sender, SaveEventArgs<ICustomerAddress> saveEventArgs)
 {
     this.ReIndexCustomers(saveEventArgs.SavedEntities.Select(x => x.Key));
 }
Beispiel #15
0
 /// <summary>
 /// The customer address service deleted.
 /// </summary>
 /// <param name="sender">
 /// The sender.
 /// </param>
 /// <param name="deleteEventArgs">
 /// The delete event args.
 /// </param>
 public void CustomerAddressServiceDeleted(ICustomerAddressService sender, DeleteEventArgs<ICustomerAddress> deleteEventArgs)
 {
     ReIndexCustomers(deleteEventArgs.DeletedEntities.Select(x => x.Key));
 }
 public CustomerAddressOperation(RequestCustomerAddress request, CustomerAddressService customerAddressService)
 {
     this.request.Header         = new Header();
     this.request                = request;
     this.customerAddressService = customerAddressService;
 }
Beispiel #17
0
        /// <summary>
        /// Initializes a new instance of the <see cref="CustomerService"/> class.
        /// </summary>
        /// <param name="provider">
        /// The provider.
        /// </param>
        /// <param name="repositoryFactory">
        /// The repository factory.
        /// </param>
        /// <param name="anonymousCustomerService">
        /// The anonymous Customer Service.
        /// </param>
        /// <param name="customerAddressService">
        /// The customer Address Service.
        /// </param>
        /// <param name="invoiceService">
        /// The invoice Service.
        /// </param>
        /// <param name="paymentService">
        /// The payment Service.
        /// </param>
        public CustomerService(
            IDatabaseUnitOfWorkProvider provider, 
            RepositoryFactory repositoryFactory, 
            IAnonymousCustomerService anonymousCustomerService, 
            ICustomerAddressService customerAddressService, 
            IInvoiceService invoiceService,
            IPaymentService paymentService)
        {
            Mandate.ParameterNotNull(provider, "provider");
            Mandate.ParameterNotNull(repositoryFactory, "repositoryFactory");
            Mandate.ParameterNotNull(anonymousCustomerService, "anonymousCustomerService");
            Mandate.ParameterNotNull(customerAddressService, "customerAddressService");
            Mandate.ParameterNotNull(invoiceService, "invoiceServie");
            Mandate.ParameterNotNull(paymentService, "paymentService");

            _uowProvider = provider;
            _repositoryFactory = repositoryFactory;
            _anonymousCustomerService = anonymousCustomerService;
            _customerAddressService = customerAddressService;
            _invoiceService = invoiceService;
            _paymentService = paymentService;
        }