Пример #1
0
        private void btnEditar_Click(object sender, RoutedEventArgs e)
        {
            AlunosController alunosController = new AlunosController();
            Aluno            aluno            = new Aluno();

            aluno.AlunoID    = Convert.ToInt32(txtId.Text);
            aluno.Matricula  = Convert.ToInt32(txtMatricula.Text);
            aluno.Nome       = txtNome.Text;
            aluno.Endereco   = txtEndereco.Text;
            aluno.DataInicio = dtCalendario.SelectedDate.Value;
            alunosController.Editar(aluno);
            MessageBox.Show("Editado com Sucesso");
            btnGravar.Visibility = Visibility.Visible;
            txtId.Text           = "";
            txtNome.Text         = "";
            txtEndereco.Text     = "";
            txtMatricula.Text    = "";
        }