예제 #1
0
        public static IEnumerable <SanPham> DanhSach()
        {
            var db = new ShopConnectionDB();

            return(db.Query <SanPham>("select * from SanPham where  TinhTrang = 0"));
        }
예제 #2
0
        public static IEnumerable <HangSanXuat> ListManufacturer()
        {
            var db = new ShopConnectionDB();

            return(db.Query <HangSanXuat>("select * from HangSanXuat"));
        }
예제 #3
0
        public static IEnumerable <SanPham> TopHot()
        {
            var db = new ShopConnectionDB();

            return(db.Query <SanPham>("select Top 4 * from SanPham where LuotView > 0 "));
        }
예제 #4
0
        public static IEnumerable <SanPham> Top4New()
        {
            var db = new ShopConnectionDB();

            return(db.Query <SanPham>("select Top 4 * from SanPham where GhiChu = 'new'"));
        }
예제 #5
0
        public static IEnumerable <LoaiSanPham> ListProductType()
        {
            var db = new ShopConnectionDB();

            return(db.Query <LoaiSanPham>("select * from LoaiSanPham"));
        }
예제 #6
0
        public static IEnumerable <View_lsp_hsx> ListProduct()
        {
            var db = new ShopConnectionDB();

            return(db.Query <View_lsp_hsx>("select * from View_lsp_hsx"));
        }
예제 #7
0
        public static IEnumerable <SanPham> ChiTiet(String id)
        {
            var db = new ShopConnectionDB();

            return(db.Query <SanPham>("select * from SanPham where  MaLoaiSanPham = '" + id + "'"));
        }