Beispiel #1
0
        public static HoaDonDTO TimHoaDonTheoSoHD(int sohd)
        {
            List <HoaDonDTO> lhd = new List <HoaDonDTO>();
            HoaDonDTO        hd  = new HoaDonDTO();

            try
            {
                SqlDataReader reader = DataProvider.TimHoaDonTheoSoHD("TimHoaDonTheoSoHD", sohd);
                while (reader.Read())
                {
                    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);
                }
                reader.Close();
            }
            catch
            {
            }
            return(hd);
        }