Example #1
0
        private void btAcessarAjustes_Click(object sender, EventArgs e)
        {
            TelaAjustes tela = new TelaAjustes();

            this.Close();

            tela.Show();
        }
Example #2
0
        private void btAcessarAjustes_Click(object sender, EventArgs e)
        {
            TelaAjustes tela    = new TelaAjustes();
            Usuario     usuario = new Usuario();

            usuario.Login_usuario    = tbUser_Admin.Text;
            usuario.Password_usuario = tbSenha_admin.Text;

            Validacao validacaoUser = new Validacao();

            validacaoUser = Program.Gerenciador.VerificaUsuario2(usuario);

            if (validacaoUser.Valido)
            {
                tela.Show();
                this.Close();
            }
            else
            {
                MessageBox.Show("Você não tem permissão para acessar esta área", "Acesso negado",
                                MessageBoxButtons.OK, MessageBoxIcon.Hand);
            }
        }