コード例 #1
0
        public HttpResponseMessage SupportingDocuments(string travelRequestId, int badgeNumber)
        {
            HttpResponseMessage response = null;

            try
            {
                var supportingDocuments = documentService.GetAllDocumentsByTravelId(travelRequestId, badgeNumber);

                var data = new JavaScriptSerializer().Serialize(supportingDocuments.OrderByDescending(item => item.Id));

                response = Request.CreateResponse(HttpStatusCode.OK, data);
            }
            catch (Exception ex)
            {
                LogMessage.Log("api/documents/supportingdocuments : " + ex.Message);
                response = Request.CreateResponse(HttpStatusCode.InternalServerError);
            }

            return(response);
        }