private void cboSearch_TextChanged(object sender, EventArgs e) { int i = 0; if (cboSearch.Text == "") { HienThiDanhSanhSachPhieuXuat(); return; } px.Search = cboSearch.Text; List <PhieuXuatHang> pxlist = pxbll.TimKiemPhieuXuatHang(px); dgvPhieuXuat.Rows.Clear(); foreach (PhieuXuatHang pxs in pxlist) { DataGridViewRow row = new DataGridViewRow(); row.CreateCells(dgvPhieuXuat); row.Cells[0].Value = i + 1; row.Cells[1].Value = pxs.MaPx; row.Cells[2].Value = pxs.MaNv; row.Cells[3].Value = pxs.MaSp; row.Cells[4].Value = pxs.MaKh; row.Cells[5].Value = pxs.Slx; row.Cells[6].Value = pxs.NgayXuat; row.Cells[7].Value = pxs.PhanTram; row.Cells[8].Value = pxs.ThanhTiens; dgvPhieuXuat.Rows.Add(row); ++i; } }