protected void ButtonEnviar_Click(object sender, EventArgs e) { bool escolaPublica = Convert.ToBoolean(DropDownListEscola.SelectedItem.Value); WebApplicationWhatIF.DAL.DALAluno dalaluno = new WebApplicationWhatIF.DAL.DALAluno(); List <Modelo.Aluno> alunoverif = new List <Modelo.Aluno>(); alunoverif = dalaluno.Select(TextBoxNome.Text); if (alunoverif.Count == 0) { Modelo.Aluno aluno = new Modelo.Aluno(TextBoxNome.Text, TextBoxSenha.Text, TextBoxEmail.Text, escolaPublica, false, null); // FAZER IR FOTO PADRAO dalaluno.InsertNovoAluno(aluno); Response.Redirect("~/WebFormAutenticar.aspx"); } else { Label1.Text = "Nome do usuário já está sendo usado."; } }
// Construtor public RespostaDoAlunoExercicio() { aluno = new Aluno(); alternativaexercicio = new alternativaExercicio(); }