Esempio n. 1
0
        public RequestedItems LookupRequestedItem(string reqID)
        {
            try
            {
                if (reqID.Equals(""))
                {
                    return(new RequestedItems());
                }
                string full = startURL + @"sc_req_item?sysparm_limit=10&sysparm_query=request.sys_id%3D" + reqID;

                var result = (RequestedItems)callServiceNow(full, typeof(RequestedItems));
                foreach (var t in result.result)
                {
                    t.state = resolveState(t.state);
                }
                return(result);
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
                writeLog(e.Message);
                RequestedItems u = new RequestedItems();
                u.noResultData = true;
                return(u);
            }
        }
        public RequestedItems LookupRequestedItem(string reqID)
        {
            try
            {
                if (reqID.Equals("")) return new RequestedItems();
                string full = startURL + @"sc_req_item?sysparm_limit=10&sysparm_query=request.sys_id%3D" + reqID;

                var result = (RequestedItems)callServiceNow(full, typeof(RequestedItems));
                foreach (var t in result.result)
                {
                    t.state = resolveState(t.state);
                }
                return result;
            }
            catch (Exception e)
            {
                Debug.WriteLine(e.Message);
                writeLog(e.Message);
                RequestedItems u = new RequestedItems();
                u.noResultData = true;
                return u;
            }
        }