public static List <SanPhamDTO> TimSapXepGiaDenDMALL(int giaden) { SqlDataReader reader = DataProvider.TimSapXepGiaDenALL("TimSapXepGiaDenALL", giaden); List <SanPhamDTO> lsp = new List <SanPhamDTO>(); while (reader.Read()) { SanPhamDTO sp = new SanPhamDTO(); sp.MaSP = reader.GetString(0); sp.TenSP = reader.GetString(1); sp.TenDanhMuc = reader.GetString(2); sp.TenLoaiSP = reader.GetString(3); sp.XuatXu = reader.GetString(4); sp.DonViTinh = reader.GetString(5); sp.GiaBan = (int)reader.GetDecimal(6); sp.SoLuong = reader.GetInt32(7); lsp.Add(sp); } reader.Close(); return(lsp); }