private void cboNhaSx_TextChanged(object sender, EventArgs e) { if (cboNhaSx.Text == "") { HienThiThongKe(); return; } cboLoaiSp.Text = ""; int i = 0; tk.TenSx = cboNhaSx.Text; List <ThongKe> tklist = tkbll.ThongKeDonDatHangTheoNhaSx(tk); dgvThongKeDonHang.Rows.Clear(); foreach (ThongKe tks in tklist) { DataGridViewRow row = new DataGridViewRow(); row.CreateCells(dgvThongKeDonHang); row.Cells[0].Value = i + 1; row.Cells[1].Value = tks.MaSp; row.Cells[2].Value = tks.TenSp; row.Cells[3].Value = tks.TenLoai; row.Cells[4].Value = tks.TenSx; row.Cells[5].Value = tks.Sld; dgvThongKeDonHang.Rows.Add(row); ++i; } cboTongDondh.Text = i.ToString(); cboTongSldh.DataSource = tkbll.TongSldhTheoNhaSx(tk); }