public void XemCTHDB(int x, int y, ConsoleColor background_color, ConsoleColor text_color) { do { Console.BackgroundColor = background_color; Console.ForegroundColor = text_color; string mahdb = ""; ICTHDBanBLL cthdban = new CTHDBanBLL(); IHDBanBLL hdban = new HDBanBLL(); HDBanBLL hdbBLL = new HDBanBLL(); Console.Clear(); IO.Box(0, 0, 28, 114, ConsoleColor.Black, ConsoleColor.White); IO.BoxTitle(" XEM DANH SÁCH CHI TIẾT HÓA ĐƠN NHẬP", x, y, 8, 112); IO.Writexy("Nhập mã hóa đơn bán cần xem chi tiết:", x + 2, y + 3); IO.Writexy("--------------------------------------------------------------------------------------------------------------", x + 1, y + 4); IO.Writexy("Nhập ! để thoát...", x + 4, y + 6); Hien(x + 13, y + 8, hdban.LayDSHDBan(), 5, 0); do { Console.SetCursorPosition(x + 40, y + 3); mahdb = Console.ReadLine(); if (mahdb == "") { IO.Clear(x + 3, y + 5, 60, ConsoleColor.Black); IO.Writexy("Nhập lại mã hóa đơn bán...", x + 4, y + 5, ConsoleColor.Black, ConsoleColor.White); } else if (mahdb == "!") { return; } else { if (hdbBLL.KT_MaHDB(CongCu.ChuanHoaMa(mahdb)) == false) { IO.Clear(x + 3, y + 5, 60, ConsoleColor.Black); IO.Writexy("Không tồn tại mã hóa đơn bán này...", x + 4, y + 5, ConsoleColor.Black, ConsoleColor.White); IO.Clear(x + 39, y + 3, 60, ConsoleColor.Black); } else { IO.Clear(x + 3, y + 5, 60, ConsoleColor.Black); IO.Writexy("Hóa đơn bán tìm được...", x + 4, y + 5); mahdb = CongCu.ChuanHoaMa(mahdb); List <CTHDBan> list = cthdban.LayCTHDBan(new CTHDBan(mahdb, null, 0, 0, 0)); HienCT_B(x + 13, y + 8, list, 5, 1); } } } while (mahdb == "" || hdbBLL.KT_MaHDB(CongCu.ChuanHoaMa(mahdb)) == false); } while (true); }