Exemple #1
0
 public HttpResponseMessage GetBillingItem_ByID(string BillID, string token)
 {
     if (con.CheckIfTokenValid(token) != 10001 && con.IsUserInternal(token) == 1)
     {
         return(new HttpResponseMessage(HttpStatusCode.Unauthorized));
     }
     try
     {
         return(new HttpResponseMessage(HttpStatusCode.OK)
         {
             Content = new StringContent(JsonConvert.SerializeObject(con.GetBillingItem_ByID(BillID), Formatting.None))
         });
     }
     catch (Exception ex)
     {
         ExceptionLog.LogException(ex);
         return(new HttpResponseMessage(HttpStatusCode.BadRequest));
     }
 }