Esempio n. 1
0
        public static List <SanPhamDTO> TimSapXepGiaTuDMALL(int giatu)
        {
            SqlDataReader     reader = DataProvider.TimSapXepGiaTuALL("TimSapXepGiaTuALL", giatu);
            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);
        }