예제 #1
0
 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);
     }
 }
예제 #2
0
 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;
 }
예제 #3
0
 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;
     }
 }