Ejemplo n.º 1
0
        public static Page <Comment> CmtSp(string masp, int?page)
        {
            var db = new SmartShopConnectionDB();

            return(db.Page <Comment>(page.Value, 5, "SELECT * FROM Comment where MaSP=@0 ORDER BY IDCmt DESC", masp));
        }
Ejemplo n.º 2
0
        public static Page <Product> TimKiem(int?page, string key)
        {
            var db = new SmartShopConnectionDB();

            return(db.Page <Product>(page.Value, 9, "select * from Product where TenSP like '%" + key + "%' order by NgayDangSP DESC"));
        }
Ejemplo n.º 3
0
        public static Page <Product> SpTheoLoai(int?page, string maloai)
        {
            var db = new SmartShopConnectionDB();

            return(db.Page <Product>(page.Value, 9, "SELECT * FROM Product WHERE LoaiSP=@0 ORDER BY NgayDangSP DESC", maloai));
        }
Ejemplo n.º 4
0
        public static Page <Product> SpTheoCL(int?page, int?macl)
        {
            var db = new SmartShopConnectionDB();

            return(db.Page <Product>(page.Value, 9, "SELECT Product.*,ChungLoai.MaCL FROM Product,Loai,ChungLoai WHERE Product.LoaiSP=Loai.MaLoai AND Loai.MaCL=ChungLoai.MaCL AND ChungLoai.MaCL=@0 ORDER BY NgayDangSP DESC", macl));
        }
Ejemplo n.º 5
0
        public static Page <Product> DanhSachHOT(int?page)
        {
            var db = new SmartShopConnectionDB();

            return(db.Page <Product>(page.Value, 9, "SELECT * FROM Product ORDER BY LuotXem DESC"));
        }
Ejemplo n.º 6
0
        public static Page <viewAdProduct> AdDanhSach(int?page)
        {
            var db = new SmartShopConnectionDB();

            return(db.Page <viewAdProduct>(page.Value, 9, "SELECT * FROM viewAdProduct ORDER BY NgayDangSP DESC"));
        }