Exemplo n.º 1
0
        private void HienThiNhaSanxuat()
        {
            int i = 0;

            dgvNhaSanXuat.Rows.Clear();
            List <NhaSx> nsxlist = nsxbll.GetAllListNhaSx();

            foreach (NhaSx nsxs in nsxlist)
            {
                DataGridViewRow row = new DataGridViewRow();
                row.CreateCells(dgvNhaSanXuat);
                row.Cells[0].Value = i + 1;
                row.Cells[1].Value = nsxs.MaSx;
                row.Cells[2].Value = nsxs.TenSx;
                row.Cells[3].Value = nsxs.QuocGia;

                dgvNhaSanXuat.Rows.Add(row);
                ++i;
            }
        }