protected void btnCadastrarFuncionario_Click(object sender, EventArgs e)
        {
            acessoSistema func = new acessoSistema();

            string uf = ddlUf.SelectedValue;

            func.CadastrarFuncionario(txtCpf.Text, txtNome.Text, txtSenha.Text, txtEmail.Text, txtCoren.Text, uf);
            Response.Redirect("/scripts/admin/usuarios/index.aspx");
        }
Ejemplo n.º 2
0
        protected void ListarUsuariosVacinados()
        {
            acessoSistema listaUsuario = new acessoSistema();

            DataTable dt = listaUsuario.RetornarUsuariosVacinados();

            lvListaUsuario.DataSource = dt.Rows;

            lvListaUsuario.DataBind();
        }
Ejemplo n.º 3
0
        protected void ListarUsuariosVacinados()
        {
            acessoSistema listaUsuario = new acessoSistema();

            string idUsuario = Session["idUsuario"].ToString();

            DataTable dt = listaUsuario.RetornarUsuarioVacinado(idUsuario);

            lvListaUsuario.DataSource = dt.Rows;

            lvListaUsuario.DataBind();
        }
Ejemplo n.º 4
0
        protected void btnCadastrarUsuario_Click(object sender, EventArgs e)
        {
            acessoSistema usuario = new acessoSistema();

            string genero = ddlGenero.SelectedValue;

            if (usuario.validarCpf(txtCpf.Text))
            {
                Response.Write("<script>alert('Já existe um cadastro com este CPF!');</script>");
            }
            else
            {
                usuario.CadastrarUsuario(txtCpf.Text, txtNome.Text, txtSenha.Text, txtEmail.Text, genero, txtDataNasc.Text, txtRg.Text, txtEndereco.Text, txtCep.Text, txtTelefone.Text, txtCel.Text);
                Response.Write("<script>alert('Cadastro realizado!');</script>");
            }
        }
Ejemplo n.º 5
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            acessoSistema log = new acessoSistema();

            bool validarUsuario = log.acessoUsuarioAdm(txtEmail.Text, txtSenha.Text);

            if (validarUsuario)
            {
                acessoSistema coren  = new acessoSistema();
                acessoSistema idFunc = new acessoSistema();
                Session["coren"]  = coren.retornaCoren(txtEmail.Text);
                Session["idFunc"] = idFunc.retornaIdFuncionario(txtEmail.Text);
                Response.Redirect("/scripts/admin/index.aspx");
            }
            Response.Write("<script>alert('E-mail ou senha inválido(os)');</script>");
        }
Ejemplo n.º 6
0
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            acessoSistema log = new acessoSistema();

            bool validarUsuario = log.acessoUsuario(txtEmail.Text, txtSenha.Text);

            if (validarUsuario)
            {
                acessoSistema nomePaciente = new acessoSistema();
                acessoSistema cpfPaciente  = new acessoSistema();
                acessoSistema idUsuario    = new acessoSistema();
                Session["nome"]      = nomePaciente.retornaNome(txtEmail.Text);
                Session["cpf"]       = cpfPaciente.retornaCPF(txtEmail.Text);
                Session["idUsuario"] = idUsuario.retornaIdUsuario(txtEmail.Text);
                Response.Redirect("/pt/index.aspx");
            }

            Response.Write("<script>alert('E-mail ou senha inválido(os)');</script>");
        }