コード例 #1
0
        protected void btnEnviar_Click(object sender, EventArgs e)
        {
            lo.Usuario = txtUsuario.Text;
            lo.Senha   = BLL.Criptografia.getMdIHash(txtSenha.Text);
            lo.Tipo    = 2;

            pro.IdLogin = loDAL.Cadastrar(lo);


            pro.Nome      = txtNome.Text;
            pro.Email     = txtEmail.Text;
            pro.Telefone  = txtTelefone.Text;
            pro.Foto      = "."; //FIZ UMA PUTA GAMBIARRA
            pro.Cpf       = txtCpf.Text;
            pro.Descricao = txtDescricao.Text;

            proDAL.Cadastrar(pro);

            btnFiltrar_Click(null, null);
            Response.Write("<script>alert('Cadastrado com sucesso!')</script>");

            txtNome.Text      = "";
            txtEmail.Text     = "";
            txtTelefone.Text  = "";
            txtCpf.Text       = "";
            txtDescricao.Text = "";
            txtSenha.Text     = "";
            txtUsuario.Text   = "";

            txtNome.Focus();
        }
コード例 #2
0
        protected void btnCadP_Click(object sender, EventArgs e)
        {
            BLL.Professor Prof = new BLL.Professor();

            Prof.Nome  = txtNomeP.Text;
            Prof.RG    = txtRGP.Text;
            Prof.CPF   = txtCPFP.Text;
            Prof.CREF  = txtCref.Text;
            Prof.Email = txtEmailP.Text;
            Prof.Etec  = ddlETEC.SelectedValue;
            Prof.Senha = txtSenhaP.Text;

            DAL.ProfessorDAL ProfDAL = new DAL.ProfessorDAL();

            ProfDAL.Cadastrar(Prof);

            Response.Write("<script>alert('Cadastro Efetuado')</script>");
            Response.Redirect("Index.aspx");
        }