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)); } }
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)); } }