Exemple #1
0
        public string AddNoteJson()
        {
            using (servicedeskfeeds.ServiceDesk1 feed = new servicedeskfeeds.ServiceDesk1())
            {
                try
                {
                    StreamReader reader = new StreamReader(Context.Request.InputStream);
                    Context.Request.InputStream.Position = 0;
                    String  Body = reader.ReadToEnd().ToString();
                    string  isPublic = "", noteText = "", Request = "", api = "";
                    JObject json = JObject.Parse(Body);
                    isPublic = (string)json["isPublic"];
                    noteText = (string)json["Note"];
                    Request  = (string)json["Request"];
                    api      = (string)json["api"];


                    feed.AddNote(isPublic, noteText, Request, api);
                    return(" Success");
                }
                catch (Exception ex)
                {
                    return("Failed: " + ex);
                }
            }
        }
Exemple #2
0
 public void AddNote(string isPublic, string noteText, string Request, string api)
 {
     using (servicedeskfeeds.ServiceDesk1 feed = new servicedeskfeeds.ServiceDesk1())
     {
         string ret = feed.AddNote(isPublic, noteText, Request, api);
         HttpContext.Current.Response.Write(ret.Replace("<string xmlns=\"http://tempuri.org/\">", "").Replace("</string>", ""));
     }
 }
Exemple #3
0
 public void AddWorkLog(string Hours, string Minutes, string Description, string Owner, string Request, string api)
 {
     using (servicedeskfeeds.ServiceDesk1 feed = new servicedeskfeeds.ServiceDesk1())
     {
         string ret = feed.AddWorkLog(Hours, Minutes, Description, Owner, Request, api);
         HttpContext.Current.Response.Write(ret.Replace("<string xmlns=\"http://tempuri.org/\">", "").Replace("</string>", ""));
     }
 }
Exemple #4
0
 public void GetAllRequesters(string api)
 {
     using (servicedeskfeeds.ServiceDesk1 feed = new servicedeskfeeds.ServiceDesk1())
     {
         string ret = feed.GetAllRequesters(api);
         HttpContext.Current.Response.Write(ret.Replace("<string xmlns=\"http://tempuri.org/\">", "").Replace("</string>", ""));
     }
 }
Exemple #5
0
 public void Reassign(string asset, string tech, string newUser)
 {
     using (servicedeskfeeds.ServiceDesk1 feed = new servicedeskfeeds.ServiceDesk1())
     {
         string ret = feed.ReassignAsset(asset, tech, newUser);
         HttpContext.Current.Response.Write(ret.Replace("<string xmlns=\"http://tempuri.org/\">", "").Replace("</string>", ""));
     }
 }
Exemple #6
0
 public void CloseWO(string Request, string tech, string AddTime, string CloseComments, string techName)
 {
     using (servicedeskfeeds.ServiceDesk1 feed = new servicedeskfeeds.ServiceDesk1())
     {
         string ret = feed.CloseWO(Request, tech, AddTime, CloseComments, techName);
         HttpContext.Current.Response.Write(ret.Replace("<string xmlns=\"http://tempuri.org/\">", "").Replace("</string>", ""));
     }
 }
Exemple #7
0
        public void GetWorkorderDetails(string WO, string api)
        {
            using (servicedeskfeeds.ServiceDesk1 feed = new servicedeskfeeds.ServiceDesk1())
            {
                string ret = feed.GetWODetails(WO, api);

                HttpContext.Current.Response.Write(ret.Replace("<string xmlns=\"http://tempuri.org/\">", "").Replace("</string>", ""));
            }
        }