Exemplo n.º 1
0
        public TicketResult LookupTicket(string num)
        {
            try
            {
                if (num.Equals(""))
                {
                    return(new TicketResult());
                }
                string full = startURL + @"u_tech_sales_tickets?sysparm_limit=10&sysparm_query=number%3DTKS" + num;

                var result = (Ticket)callServiceNow(full, typeof(Ticket));
                result.result[0].state = resolveState(result.result[0].state);
                return(result.result[0]);
            }
            catch
            {
                TicketResult u = new TicketResult();
                u.noResultData = true;
                return(u);
            }
        }
Exemplo n.º 2
0
        public TicketResult LookupTicket(string num)
        {
            try
            {
                if (num.Equals("")) return new TicketResult();
                string full = startURL + @"u_tech_sales_tickets?sysparm_limit=10&sysparm_query=number%3DTKS" + num;

                var result = (Ticket)callServiceNow(full, typeof(Ticket));
                result.result[0].state = resolveState(result.result[0].state);
                return result.result[0];
            }
            catch
            {
                TicketResult u = new TicketResult();
                u.noResultData = true;
                return u;
            }
        }