예제 #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);
            }
        }
예제 #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;
            }
        }