private void timKiem(string value) { dgvDanhSach.Rows.Clear(); DataTable dt = HoaDonBanControl.timKiem(value);// tìm kiếm for (int i = 0; i < dt.Rows.Count; ++i) { int idTrangThai = Convert.ToInt32(dt.Rows[i][4].ToString()); string tenTrangThai = ""; if (idTrangThai == 1) { tenTrangThai = "Đã thanh toán"; } else if (idTrangThai == 2) { tenTrangThai = "Đang giao"; } else if (idTrangThai == 3) { tenTrangThai = "Chưa thanh toán"; } else if (idTrangThai == 4) { tenTrangThai = "Hoàn trả"; } dgvDanhSach.Rows.Add(new object[] { false, dt.Rows[i][0], dt.Rows[i][1], dt.Rows[i][2], dt.Rows[i][3], tenTrangThai }); } }