public StockFunctions(string conString, IStock stock, IStockFunctions stockFunctions) { if (stock != null || stockFunctions != null) { iStock = stock; IAdminStockFunctions = stockFunctions; } else { ConString = conString; IAdminStockFunctions = Factory.Factory.CreateIStockFunctions(ConString); iStock = Factory.Factory.CreateIStock(conString); } }
public ShoppingCart(ISession session, string conString, IShoppingCart testShoppingCart, IStockFunctions testStockFunctions) { if (testShoppingCart != null || testStockFunctions != null) { IShoppingCart = testShoppingCart; stockFunctions = testStockFunctions; } else { IShoppingCart = Factory.Factory.CreateIShoppingCart(conString); stockFunctions = null; } _constring = conString; _session = session; }
public OrderFunctions(string Constring, IOrderFunctions testOrderFunctions, IAdminProductFunctions testProductFunctions, IStockFunctions testStockFunctions, IStock testStock) { if (testOrderFunctions != null || testProductFunctions != null) { IOrderFunctions = testOrderFunctions; ProductFunctions = testProductFunctions; StockFunctions = testStockFunctions; Stock = testStock; } else { ConnectionString = Constring; IOrderFunctions = Factory.Factory.CreateIOrderFunctions(Constring); Stock = Factory.Factory.CreateIStock(Constring); ProductFunctions = null; StockFunctions = null; } }