Пример #1
0
 public PaymentsPairingController(IWebSession webSession, ILog log, IPurchaseOrderRepository orderRepository, IPaymentRepository paymentRepository, IOrdersFacade ordersFacade)
     : base(webSession, log)
 {
     m_orderRepository   = orderRepository;
     m_paymentRepository = paymentRepository;
     m_ordersFacade      = ordersFacade;
 }
Пример #2
0
 public SetOrdersPaid(ILog log, IPurchaseOrderRepository orderRepository, IOrdersFacade ordersFacade, OrdersSystemConfig cfg)
 {
     m_log             = log;
     m_orderRepository = orderRepository;
     m_ordersFacade    = ordersFacade;
     m_ordersConfig    = cfg;
 }
Пример #3
0
 public BatchReportingFacade(ISession session,
                             IDatabase database,
                             IMaterialBatchFacade batchFacade,
                             IMaterialBatchRepository batchRepository,
                             IMaterialRepository materialRepository,
                             IProductionFacade productionFacade,
                             AmountProcessor amountProcessor,
                             IUnitRepository unitRepository,
                             IOrdersFacade ordersFacade,
                             IOrderStatusRepository orderStatusRepository,
                             IPurchaseOrderRepository orderRepository,
                             IUserRepository userRepository,
                             IStockEventRepository stockEventRepository,
                             ISaleEventRepository saleEventRepository)
 {
     m_session               = session;
     m_database              = database;
     m_batchFacade           = batchFacade;
     m_batchRepository       = batchRepository;
     m_materialRepository    = materialRepository;
     m_productionFacade      = productionFacade;
     m_amountProcessor       = amountProcessor;
     m_unitRepository        = unitRepository;
     m_ordersFacade          = ordersFacade;
     m_orderStatusRepository = orderStatusRepository;
     m_orderRepository       = orderRepository;
     m_userRepository        = userRepository;
     m_stockEventRepository  = stockEventRepository;
     m_saleEventRepository   = saleEventRepository;
 }
Пример #4
0
 public PairPaymentsJob(
     IPurchaseOrderRepository orderRepository,
     IPaymentSystemClientFactory clientFactory,
     IPaymentRepository paymentRepository,
     IDatabase database, IOrdersFacade orders, ILog log)
 {
     m_orderRepository   = orderRepository;
     m_clientFactory     = clientFactory;
     m_paymentRepository = paymentRepository;
     m_database          = database;
     m_orders            = orders;
     m_log = log;
 }
Пример #5
0
        /// <summary>
        /// Dependency injection container for all the system's entities
        /// </summary>
        /// <param name="config">Configuration provider, defaults to DefaultConfig.cs</param>
        /// <param name="cache">Cache wrapper, defaults to SimpleInMemoryCache</param>
        /// <param name="dbWrapper">DB Wrapper, especially useful for tests. Defauls to RelationalDatabaseWrapper</param>
        /// <param name="customersFacade">A facade to customers data. Defaults to CustomersDbManager</param>
        /// <param name="taxesFacade">A facade to taxes data. Defaults to TaxesDbManager</param>
        /// <param name="ordersFacade">A facade to orders data. Defaults to OrdersDbManager</param>
        public DefaultContainer(
            IConfig config                  = null,
            IKeyValueCache cache            = null,
            IDatabaseWrapper dbWrapper      = null,
            ICustomerFacade customersFacade = null,
            ITaxesFacade taxesFacade        = null,
            IOrdersFacade ordersFacade      = null)
        {
            Config = config ?? new DefaultConfig();
            Logger = new StreamLogger(Console.OpenStandardOutput());
            Cache  = cache ?? new SimpleInMemoryCache();

            DbWrapper = dbWrapper ?? new RelationalDatabaseWrapper(Config.DATABASE_URL, Cache, Config.ROOT_QUERIES_DIR, Logger);

            CustomersFacade = customersFacade ?? new CustomersDbManager(DbWrapper);
            TaxesFacade     = taxesFacade ?? new TaxesDbManager(DbWrapper);
            OrdersFacade    = ordersFacade ?? new OrdersDbManager(DbWrapper);
        }
Пример #6
0
 public PackingController(
     IWebSession webSession,
     ILog log,
     IPurchaseOrderRepository orderRepository,
     IShipmentProvider shipmentProvider,
     IOrdersFacade ordersFacade,
     IKitProductRepository kitProductRepository,
     IErpClientFactory erpClientFactory,
     IMaterialBatchFacade batchFacade,
     IDatabase database,
     IVirtualProductFacade virtualProductFacade, OrdersSystemConfig config)
     : base(webSession, log)
 {
     m_orderRepository      = orderRepository;
     m_shipmentProvider     = shipmentProvider;
     m_ordersFacade         = ordersFacade;
     m_kitProductRepository = kitProductRepository;
     m_erpClientFactory     = erpClientFactory;
     m_batchFacade          = batchFacade;
     m_database             = database;
     m_virtualProductFacade = virtualProductFacade;
     m_config = config;
 }
Пример #7
0
 public ShipmentController(IWebSession webSession, ILog log, IOrdersFacade ordersFacade, IShipmentProvider shipmentProvider)
     : base(webSession, log)
 {
     m_ordersFacade     = ordersFacade;
     m_shipmentProvider = shipmentProvider;
 }