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