示例#1
0
        private void Button1_Click(object sender, EventArgs e)
        {
            TelaDeCadastro cadastro = new TelaDeCadastro();

            cadastro.ShowDialog();
            alunos.Add(cadastro.novoAluno);
        }
示例#2
0
        private void Button1_Click(object sender, EventArgs e)
        {
            TelaDeCadastro formCad = new TelaDeCadastro();

            formCad.ShowDialog();
            aluno.Add(formCad.novoAluno);

            dataGridView1.DataSource = null;
            dataGridView1.DataSource = aluno;;
        }