コード例 #1
0
 public HttpResponseMessage InsertReviewCategory(List <ReviewCategoryRequestViewModels> data)
 {
     using (var clientContext = BambooAirwayBE.API.Utilities.Utils.Utils.InitializeClientContext())
     {
         var job     = new FlightAttendantJob(clientContext);
         var allItem = job.InsertReviewCategory(data, clientContext);
         if (allItem.ErrorType != 400)
         {
             return(Request.CreateResponse(HttpStatusCode.OK, allItem));
         }
         return(Request.CreateResponse(HttpStatusCode.BadRequest, allItem));
     }
 }
コード例 #2
0
 public HttpResponseMessage GetAllReviewCategory()
 {
     using (var clientContext = BambooAirwayBE.API.Utilities.Utils.Utils.InitializeClientContext())
     {
         var job             = new FlightAttendantJob(clientContext);
         var allTimeKeepings = job.GetAllReviewCategory();
         if (allTimeKeepings.ErrorType != 400)
         {
             return(Request.CreateResponse(HttpStatusCode.OK, allTimeKeepings));
         }
         return(Request.CreateResponse(HttpStatusCode.BadRequest, allTimeKeepings));
     }
 }