Esempio n. 1
0
        protected void btnSalve_Click(object sender, EventArgs e)
        {
            Usuario usu = new Usuario();

            usu.User  = txtUsuario.Text;
            usu.senha = txtSenha.Text;


            CadastrarUsuarioDAL cd = new CadastrarUsuarioDAL();

            cd.CadastrarUsuario(usu);


            lblSucess.Text = "Usuario cadastrado!";
        }
Esempio n. 2
0
        private void btnCadastrar_Click(object sender, EventArgs e)
        {
            CadastrarUsuarioDAL dal = new CadastrarUsuarioDAL();

            Usuario user = new Usuario();

            user.User  = txtUsu.Text;
            user.senha = txtSenha.Text;

            dal.CadastrarUsuario(user);

            MessageBox.Show("Cadastrado com sucesso!!!");

            txtSenha.Text = "";
            txtUsu.Text   = "";
        }