Exemple #1
0
        private void btnExcluir_Click(object sender, RoutedEventArgs e)
        {
            var idExclusao = Convert.ToInt32(txtId.Text);

            alunosController.Excluir(idExclusao);
            MessageBox.Show("Exclusão efetuada com sucesso");
        }
Exemple #2
0
        private void btnExcluir_Click(object sender, EventArgs e)
        {
            int matricula = int.Parse(txtMatriculaAluno.Text);

            AlunosController alunosController = new AlunosController();

            alunosController.Excluir(matricula);

            frmAvisoExcluir excluirAluno = new frmAvisoExcluir();

            excluirAluno.ShowDialog();
        }
        private void btnExcluirAluno_Click(object sender, EventArgs e)
        {
            DialogResult d = MessageBox.Show("Realmente deseja Excluir?", "AVISO", MessageBoxButtons.YesNo);

            if (d.ToString() == "Yes")
            {
                Aluno            aluno            = new Aluno();
                AlunosController alunosController = new AlunosController();
                aluno = alunosController.BuscarPorID(int.Parse(txtIDAluno.Text));
                alunosController.Excluir(aluno.AlunoID);
                this.LimparCampos();
                MessageBox.Show("Aluno excluído do sistema!", "AVISO");
            }
        }
        private void btnDeletar_Click(object sender, EventArgs e)
        {
            Aluno del = new Aluno
            {
                AlunoID = int.Parse(txtDeletar.Text)
            };

            AlunosController alunosController = new AlunosController();

            alunosController.Excluir(del.AlunoID);
            txtDeletar.Clear();

            MessageBox.Show("o Id:" + del.AlunoID);
        }
Exemple #5
0
        private void btnDeletar_Click(object sender, EventArgs e)
        {
            Aluno delete = new Aluno
            {
                AlunoID = int.Parse(txtDeletar.Text)
            };


            AlunosController alunosController = new AlunosController();

            alunosController.Excluir(delete.AlunoID);
            MessageBox.Show("O Aluno de ID: " + delete.AlunoID + " Foi deletado!");
            Close();
            frmDeletarAluno dd = new frmDeletarAluno();

            dd.Show();
        }