示例#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));
        }
示例#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"));
        }
示例#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));
        }
示例#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));
        }
示例#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"));
        }
示例#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"));
        }