private void txttimkiem_TextChanged(object sender, EventArgs e) { using (quanlithucungEntities1 quanli = new quanlithucungEntities1()) { if (txttimkiem.Text.Trim() == "" || txttimkiem.Text.Trim() == null) { dgvHoaDon.DataSource = quanli.HoaDons.ToList(); } else if (txttimkiem.Text.Trim() != "") { dgvHoaDon.AutoGenerateColumns = false; dgvHoaDon.DataSource = quanli.timkiemHD(txttimkiem.Text); } } }