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