Beispiel #1
0
        private void button6_Click(object sender, EventArgs e)
        {
            AlunoService service = new AlunoService(new AlunoRepository());
            DataGridViewRow row = this.GridAlunos.SelectedRows[0];
            Aluno alunos = service.Delete(Convert.ToInt32(row.Cells["Id"].Value));
            GridAlunos.DataSource = alunos;

            AlunoService service1 = new AlunoService(new AlunoRepository());
            List<Aluno> alunos1 = service.RetrieveAll();
            GridAlunos.DataSource = alunos1;
        }
Beispiel #2
0
 private void button4_Click(object sender, EventArgs e)
 {
     AlunoService service = new AlunoService(new AlunoRepository());
     List<Aluno> alunos = service.RetrieveAll();
     GridAlunos.DataSource = alunos;
 }