示例#1
0
        public static List <HoaDonDTO> LayHoaDonTheoTuKhoa(string tukhoa)
        {
            List <HoaDonDTO> lhd = new List <HoaDonDTO>();

            try
            {
                SqlDataReader reader = DataProvider.TimHoaDonTheoTuKhoa("TimHoaDonTheoTuKhoa", tukhoa);

                while (reader.Read())
                {
                    HoaDonDTO hd = new HoaDonDTO();
                    hd.SoHD       = reader.GetInt32(0);
                    hd.MaKH       = reader.GetString(1);
                    hd.MaNV       = reader.GetString(2);
                    hd.NgayHoaDon = reader.GetDateTime(3);
                    hd.TriGia     = (int)reader.GetDecimal(4);
                    lhd.Add(hd);
                }
                reader.Close();
            }
            catch
            {
            }
            return(lhd);
        }