コード例 #1
0
        public void HienThiThongKe()
        {
            int            i      = 0;
            List <ThongKe> tklist = tkbll.ThongKeDonDatHang();

            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();
        }