Esempio n. 1
0
        public HttpResponseMessage SubmitTravelRequestNew(SubmitTravelRequest submitTravelRequest)
        {
            HttpResponseMessage response = null;

            try
            {
                var result = approvalService.SubmitTravelRequestNew(submitTravelRequest);
                response = Request.CreateResponse(HttpStatusCode.OK, result);
            }
            catch (Exception ex)
            {
                LogMessage.Log("api/approval/submitNew :" + ex.Message);
                response = Request.CreateResponse(HttpStatusCode.InternalServerError, "Travel request was not successfully submited. Please try again.");
            }

            return(response);
        }