private void DanhSachThongKe() { int i = 0; List <ThongKe> tklist = tkbll.ThongKePhieuXuat(); dgvThongKePhieuXuat.Rows.Clear(); foreach (ThongKe tks in tklist) { DataGridViewRow row = new DataGridViewRow(); row.CreateCells(dgvThongKePhieuXuat); row.Cells[0].Value = i + 1; row.Cells[1].Value = tks.MaSp.ToString(); row.Cells[2].Value = tks.TenSp.ToString(); row.Cells[3].Value = tks.TenLoai.ToString(); row.Cells[4].Value = tks.TenSx.ToString(); row.Cells[5].Value = tks.TenKh.ToString(); row.Cells[6].Value = tks.Slx.ToString(); row.Cells[7].Value = tks.TongTien; row.Cells[8].Value = tks.PhanTram.ToString(); row.Cells[9].Value = tks.ThanhTien; dgvThongKePhieuXuat.Rows.Add(row); ++i; } cboTongPhieuXuat.Text = i.ToString(); }