public ProductFunctions(string conString, IAdminProductFunctions AdminProductFunctions, IUserProductFunctions UserProductFunctions, IProduct IProduct)
 {
     ConString = conString;
     if (AdminProductFunctions != null || UserProductFunctions != null || IProduct != null)
     {
         iAdminProductFunctions = AdminProductFunctions;
         iUserProductFunctions  = UserProductFunctions;
         iProduct = IProduct;
     }
     else
     {
         iAdminProductFunctions = Factory.Factory.CreateIAdminProductFunctions(ConString);
         iUserProductFunctions  = Factory.Factory.CreateIUserProductFunctions(ConString);
         iProduct = Factory.Factory.CreateIProduct(conString);
     }
 }
示例#2
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;
     }
 }