示例#1
0
 public static List <CProduct> GetProducts()
 {
     try
     {
         CDatabase       db       = new CDatabase();
         List <CProduct> Products = db.GetProducts();
         return(Products);
     }
     catch (Exception)
     {
         return(null);
     }
 }
示例#2
0
 public static CProduct GetProduct(int intProductID)
 {
     try
     {
         CDatabase       db       = new CDatabase();
         List <CProduct> Products = db.GetProducts(intProductID);
         return(Products[0]);
     }
     catch (Exception)
     {
         return(null);
     }
 }