Example #1
0
 public OrderProcessingService(IOrgProvider orgProvider, ICatalogProvider catalogProvider, ILocationRepository locationRepository, IOrderRepository orderRepository, IOrderCalculator caluclator)
 {
     m_catalog_provider = catalogProvider;
     m_order_repository = orderRepository;
     m_order_calculator = caluclator;
     m_org_provider     = orgProvider;
 }
Example #2
0
 public MainWindow()
 {
     InitializeComponent();
     dgOrder.ItemsSource = order;
     pizMan   = new PizzaManager();
     orderCal = new OrderCalculator();
 }
 public CalculatorDecorator(
     IOrderCalculator orderCalculator,
     ICanDiscountStrategy canDiscountStrategy,
     IApplyDiscountStrategy applyDiscountStrategy
     )
 {
     this.orderCalculator       = orderCalculator;
     this.canDiscountStrategy   = canDiscountStrategy;
     this.applyDiscountStrategy = applyDiscountStrategy;
 }
Example #4
0
 public CartService(
     IDbContext dbContext,
     IRepository <Account> accountRepository,
     IRepository <CartItem> cartItemRepository,
     IRepository <Currency> currencyRepository,
     IRepository <Country> countryRepository,
     IRepository <ProductMedia> productMediaRepository,
     IRepository <ShippingOption> shippingOptionRepository,
     IRepository <OfferRule> offerRuleRepository,
     IRepository <CartPharmOrder> cartPharmOrderRepository,
     IRepository <CartPharmItem> cartPharmItemRepository,
     IRepository <TaxCategory> taxCategoryRepository,
     IOrderCalculator orderCalculator,
     IOfferService offerService,
     ICurrencyService currencyService,
     IGenericAttributeService genericAttributeService,
     IShippingService shippingService,
     IAccountService accountService,
     ICartValidator cartValidator,
     ICacheManager cacheManager,
     ILogBuilder logBuilder,
     IProductBuilder productBuilder,
     ICartItemBuilder cartItemBuilder,
     ShoppingCartSettings shoppingCartSettings,
     TaxSettings taxSettings,
     MediaSettings mediaSettings,
     ShippingSettings shippingSettings)
 {
     _dbContext                = dbContext;
     _accountRepository        = accountRepository;
     _cartItemRepository       = cartItemRepository;
     _currencyRepository       = currencyRepository;
     _countryRepository        = countryRepository;
     _productMediaRepository   = productMediaRepository;
     _shippingOptionRepository = shippingOptionRepository;
     _offerRuleRepository      = offerRuleRepository;
     _cartPharmOrderRepository = cartPharmOrderRepository;
     _cartPharmItemRepository  = cartPharmItemRepository;
     _taxCategoryRepository    = taxCategoryRepository;
     _orderCalculator          = orderCalculator;
     _offerService             = offerService;
     _currencyService          = currencyService;
     _genericAttributeService  = genericAttributeService;
     _shippingService          = shippingService;
     _accountService           = accountService;
     _cartValidator            = cartValidator;
     _cacheManager             = cacheManager;
     _productBuilder           = productBuilder;
     _cartItemBuilder          = cartItemBuilder;
     _shoppingCartSettings     = shoppingCartSettings;
     _taxSettings              = taxSettings;
     _mediaSettings            = mediaSettings;
     _shippingSettings         = shippingSettings;
     _logger = logBuilder.CreateLogger(GetType().FullName);
 }
Example #5
0
 public OrderController(OrderRepository orders, ProductRepository products,
                        IMessagePublisher messagePublisher, Constants constants,
                        IBillingManager billingManager, CompanyRepository companies,
                        IOrderCalculator orderCalculator, IEnvironment environment)
 {
     this.orders           = orders;
     this.products         = products;
     this.messagePublisher = messagePublisher;
     this.constants        = constants;
     this.billingManager   = billingManager;
     this.companies        = companies;
     this.random           = new Random();
     this.orderCalculator  = orderCalculator;
     this.environment      = environment;
 }
 public GoogleFeedGenerator(
     ICategoryService categoryService,
     IShippingService shippingService,
     IOrderCalculator orderCalculator,
     ICurrencyService currencyService,
     StoreInformationSettings storeInformationSettings,
     MediaSettings mediaSettings)
 {
     _categoryService          = categoryService;
     _shippingService          = shippingService;
     _currencyService          = currencyService;
     _storeInformationSettings = storeInformationSettings;
     _mediaSettings            = mediaSettings;
     _orderCalculator          = orderCalculator;
 }
 public MatchingEngine(IDictionaryProxy dictionaryProxy,
                       IAccountInfoRepository accountInfoRepository, IAssetPairQuoteRepository assetPairQuoteRepository,
                       IMarketOrderRepository marketOrderRepository, IPendingOrderRepository pendingOrderRepository,
                       ITransactionHistoryRepository transactionHistoryRepository, IOrderCalculator orderCalculator,
                       IMatchingEngineEventSubscriber matchingEngineEventSubscriber, IOrderBookService orderBookService)
 {
     _dictionaryProxy               = dictionaryProxy;
     _accountInfoRepository         = accountInfoRepository;
     _assetPairQuoteRepository      = assetPairQuoteRepository;
     _marketOrderRepository         = marketOrderRepository;
     _pendingOrderRepository        = pendingOrderRepository;
     _transactionHistoryRepository  = transactionHistoryRepository;
     _orderCalculator               = orderCalculator;
     _matchingEngineEventSubscriber = matchingEngineEventSubscriber;
     _orderBookService              = orderBookService;
 }
Example #8
0
        public AffiliateWindowFeedGenerator(
            ICategoryService categoryService,
            ILogBuilder logBuilder,
            IOrderCalculator orderCalculator,
            StoreInformationSettings storeInformationSettings,
            MediaSettings mediaSettings)
        {
            _categoryService          = categoryService;
            _storeInformationSettings = storeInformationSettings;
            _mediaSettings            = mediaSettings;
            _orderCalculator          = orderCalculator;

            _logger = logBuilder.CreateLogger(GetType().FullName);
            if (_logger == null)
            {
                throw new NullReferenceException("Object logger is null as Object logBuilder was failed to create logger.");
            }
        }
Example #9
0
 public OrderBuilder(
     IRepository <ShippingOption> shippingOptionRepository,
     IRepository <LineItem> lineItemRepository,
     IRepository <Country> countryRepository,
     IRepository <USState> usStateRepository,
     IRepository <OrderComment> orderCommentRepository,
     IRepository <OrderStatus> orderStatusRepository,
     IRepository <PharmOrder> pharmOrderRepository,
     IRepository <PharmItem> pharmItemRepository,
     IOrderCalculator orderCalculator)
 {
     _countryRepository        = countryRepository;
     _usStateRepository        = usStateRepository;
     _lineItemRepository       = lineItemRepository;
     _shippingOptionRepository = shippingOptionRepository;
     _orderCommentRepository   = orderCommentRepository;
     _orderStatusRepository    = orderStatusRepository;
     _pharmOrderRepository     = pharmOrderRepository;
     _pharmItemRepository      = pharmItemRepository;
     _orderCalculator          = orderCalculator;
 }
Example #10
0
        // Returns the total order cost after the tax has been applied
        public decimal GetOrderTotal(IOrderCalculator orderCalculator, decimal taxRate)
        {
            if (orderCalculator == null)
            {
                orderCalculator = new OrderCalculator();
            }

            return(orderCalculator.CalculateTotal(this, taxRate));

            //decimal total = 0;
            //foreach (var orderitem in orderItems)
            //{
            //    var netTotal = orderitem.Quantity * orderitem.Item.GetPrice();
            //    if (orderitem is Interfaces.ITaxable)
            //    {
            //        var totalWithTax = Math.Round(netTotal + (netTotal * taxRate), 2, MidpointRounding.AwayFromZero) ;
            //        total += totalWithTax;
            //    }
            //    else
            //        total += netTotal;
            //}
            //return total;
        }
Example #11
0
 public OrderProvider(IOrderRepository orderRepository, IOrderCalculator orderCalculator)
 {
     m_order_repository = orderRepository;
     m_order_caluclator = orderCalculator;
 }
Example #12
0
 public OrderService(IOrderCalculator orderCalculator, IGuidEntityRepository <Order> orderRepository)
 {
     OrderCalculator = orderCalculator;
     OrderRepository = orderRepository;
 }
 public MockCreateOrderHandler(IOrderCalculator orderCalculator)
 {
     _orderCalculator = orderCalculator;
 }