Exemplo n.º 1
0
        public async Task <bool> VerificaLogin(string sdsUsuario)
        {
            await GetHostName(sdsUsuario);

            var response = await(await WSRequest.RequestGET("TFServMInf/f_retorna_id_usuario/" + sdsUsuario)).Content.ReadAsStringAsync();
            var json     = response.Replace(@"\", "").Replace("\"[", "[").Replace("]\"", "]");

            if (int.Parse(json) > 0)
            {
                return(true);
            }
            return(false);
        }
Exemplo n.º 2
0
        public async Task <string> BuscarHostName(string sdsUsuario)
        {
            try
            {
                var response = await(await WSRequest.RequestGETSolari("TFDM_CONEXAO/f_host_name_login/" + sdsUsuario)).Content.ReadAsStringAsync();
                var json     = response.Replace("\"", "").Replace("\"[", "[").Replace("]\"", "]");

                return(json);
            }
            catch
            {
                return(null);
            }
        }
Exemplo n.º 3
0
        public async Task <DadosAcessoModel> GetDadosMenu()
        {
            try
            {
                var retorno = await(await WSRequest.RequestGET("TFServMINF/f_get_menu_dados/" + App.current.sdsUsuario)).Content.ReadAsStringAsync();

                retorno = retorno.Replace(@"\", "").Replace("\"[", "[").Replace("]\"", "]").Replace("\"{", "{").Replace("}\"", "}");

                return(JsonConvert.DeserializeObject <DadosAcessoModel>(Util.StringUnicodeToUTF8(retorno)));
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }