Пример #1
0
        public newTicket SubmitTicket(string userId, string description)
        {
            try
            {
                if (userId.Equals("") || description.Equals(""))
                {
                    return(new newTicket());
                }

                string url     = startURL + @"u_tech_sales_tickets";
                string body    = "{'short_description':'" + description + "','u_caller':'" + userId + "'}";
                var    content = (newTicket)uploadServiceNow(url, typeof(newTicket), body);
                writeLog("Created Ticket: " + content.result.number);
                return(content);
            }
            catch
            {
                newTicket u = new newTicket();
                u.noResultData = true;
                return(u);
            }
        }
Пример #2
0
        public newTicket SubmitTicket(string userId, string description)
        {
            try
            {
                if (userId.Equals("") || description.Equals("")) return new newTicket();

                string url = startURL + @"u_tech_sales_tickets";
                string body = "{'short_description':'" + description + "','u_caller':'" + userId + "'}";
                var content = (newTicket)uploadServiceNow(url, typeof(newTicket), body);
                writeLog("Created Ticket: " + content.result.number);
                return content;
            }
            catch
            {
                newTicket u = new newTicket();
                u.noResultData = true;
                return u;
            }
        }