Example #1
0
    protected void BtnSalvar_Click(object sender, EventArgs e)
    {
        var aluno = new Aluno();

        _alunoBo = new AlunoBo();

        aluno.Nome         = TxtNome.Text;
        aluno.Email        = TxtEmail.Text;
        aluno.DtNascimento = TxtDtNascimento.Text;

        if (RadioMasculino.Checked)
        {
            aluno.Genero = "M";
        }
        else
        {
            aluno.Genero = "F";
        }

        aluno.Telefone   = TxtTelefone.Text;
        aluno.Celular    = Txtcelular.Text;
        aluno.Observacao = TxtAreaObservacao.Text;

        aluno.DtCadastro      = DateTime.Now.ToString("dd/MM/yyyy");
        aluno.UsuarioCadastro = Convert.ToInt32(Session["UsuarioId"]);
        aluno.Status          = "A";

        try
        {
            _alunoBo.InserirNovoAluno(aluno);
        }
        catch
        {
        }
    }
Example #2
0
    protected void BtnSalvar_Click(object sender, EventArgs e)
    {
        var aluno = new Aluno();

        _alunoBo = new AlunoBo();

        aluno.Nome         = TxtNome.Text;
        aluno.Email        = TxtEmail.Text;
        aluno.DtNascimento = TxtDtNascimento.Text;

        if (RadioMasculino.Checked)
        {
            aluno.Genero = "M";
        }
        else
        {
            aluno.Genero = "F";
        }

        aluno.Telefone   = TxtTelefone.Text;
        aluno.Celular    = Txtcelular.Text;
        aluno.Observacao = TxtAreaObservacao.Text;

        aluno.DtCadastro      = DateTime.Now.ToString("dd/MM/yyyy");
        aluno.UsuarioCadastro = Convert.ToInt32(Session["UsuarioId"]);
        aluno.Status          = "A";

        try
        {
            _alunoBo.InserirNovoAluno(aluno);
            Page.ClientScript.RegisterStartupScript(this.GetType(), "Scripts", "<script>alert('msg qualquer');</script>");
        }
        catch
        {
        }
    }