Beispiel #1
0
        public static SqlDataReader LayThongTinMotSanPham(string idSanPham, string idChiTiet)
        {
            string query = string.Format("SELECT SanPham.*,DanhMuc.*,ChiTietSanPham.*,HinhAnh.Url,HinhAnh.MaHinhAnh FROM SanPham, DanhMuc, ChiTietSanPham, HinhAnh  WHERE SanPham.MaDanhMuc = DanhMuc.MaDanhMuc AND ChiTietSanPham.MaSP = SanPham.MaSP AND ChiTietSanPham.MaHinhAnh = HinhAnh.MaHinhAnh AND SanPham.MaSP='{0}' AND ChiTietSanPham.MaCTSP ='{1}'", idSanPham, idChiTiet);

            drSanPham = XuLyDuLieu.LayDuLieu(query);
            return(drSanPham);
        }
Beispiel #2
0
        public static SqlDataReader LayChiTiet(string maSP, string mauSac)
        {
            SqlDataReader drChiTiet;
            string        query = string.Format("SELECT * FROM ChiTietSanPham WHERE MaSP = '{0}' AND MauSac =N'{1}'", maSP, mauSac);

            drChiTiet = XuLyDuLieu.LayDuLieu(query);
            return(drChiTiet);
        }