Ejemplo n.º 1
0
        public UserResult UserExist(string phone)
        {
            try
            {
                if (phone.Equals(""))
                {
                    return(new UserResult());
                }

                string full = startURL + @"sys_user?sysparm_limit=10&sysparm_query=phone%3D" + escapePhone(phone);

                var user = (ServiceNowUser)callServiceNow(full, typeof(ServiceNowUser));
                writeLog("User called in: " + user.result[0].name);
                return(user.result[0]);
            }
            catch
            {
                UserResult u = new UserResult();
                u.noResultData = true;
                return(u);
            }
        }
Ejemplo n.º 2
0
        public UserResult UserExist(string phone)
        {
            try
            {
                if (phone.Equals("")) return new UserResult();

                string full = startURL + @"sys_user?sysparm_limit=10&sysparm_query=phone%3D" + escapePhone(phone);

                var user = (ServiceNowUser)callServiceNow(full, typeof(ServiceNowUser));
                writeLog("User called in: " + user.result[0].name);
                return user.result[0];
            }
            catch
            {
                UserResult u = new UserResult();
                u.noResultData = true;
                return u;
            }
        }