protected void EditarAluno_Click(object sender, EventArgs e) { DAL.DALAluno dALAluno = new DAL.DALAluno(); Aluno.alunoNome = TextBoxAlunoNome.Text; Aluno.dataNascimento = DateTime.Parse(TextBoxCalendarDataNascimento.Text); Aluno.cpf = TextBoxCpf.Text; Aluno.rg = TextBoxRg.Text; Aluno.rgOrgao = TextBoxRGOrgao.Text; Aluno.estadoCivil = Convert.ToInt32(DropDownListEstadoCivil.SelectedItem.Value); Aluno.naturalidade = TextBoxNaturalidade.Text; Aluno.naturalidadeEstado = TextBoxNaturalidadeEstado.Text; Aluno.endereco = TextBoxEndereco.Text; Aluno.bairro = TextBoxBairro.Text; Aluno.cidade = TextBoxCidade.Text; Aluno.estado = TextBoxEstado.Text; Aluno.telefone1 = TextBoxTelefone1.Text; Aluno.telefone2 = TextBoxTelefone2.Text; Aluno.contato = TextBoxContato.Text; Aluno.contatoTelefone = TextBoxContatoTelefone.Text; dALAluno.update(Aluno); Session.Remove("IdAluno"); Response.Redirect("~/Matricula/WebFormVisualizarAlunos.aspx"); }