private bool Autenticado(string usuario, string senha) { ControleAcessoServiceClient servico = new ControleAcessoServiceClient(); try { var resultService = servico.ListarUsuarioPorLoginAsync(usuario); resultService.Wait(); if (HashEncryption.Compare(senha.ToUpper(), resultService.Result.Senha.ToUpper()) && (resultService.Result.Status.Equals("A"))) { return(true); } else { return(false); } } catch (Exception) { return(false); } }