private void Editar_Click(object sender, RoutedEventArgs e)
        {
            InputBox box = new InputBox(txtEmail.Text);

            if (box.ShowDialog().Value)
            {
                txtEmail.Text = box.Input;
                aluno.Email   = box.Input;
                n.Atualizar(aluno);
            }
        }
Beispiel #2
0
 private void Atualizar_Click(object sender, RoutedEventArgs e)
 {
     if (grid.SelectedItem != null)
     {
         Aluno a = grid.SelectedItem as Aluno;
         a.Nome      = txtAluno.Text;
         a.Senha     = Criptografia.Criptografar(txtSenha.Password);
         a.Email     = txtEmail.Text;
         a.Foto      = foto;
         a.Matricula = txtMatricula.Text;
         a.Cpf       = txtCpf.Text;
         a.TurmaId   = (box.SelectedItem as Turma).Id;
         n.Atualizar(a);
     }
     grid.ItemsSource = n.Listar();
 }