Esempio n. 1
0
 public string SaveTravelRequestReimbursement(ReimbursementInput reimbursementRequest)
 {
     try
     {
         string reimbursementId = reimbursementRepository.SaveTravelRequestReimbursement(reimbursementRequest);
         return(reimbursementId);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Esempio n. 2
0
        public HttpResponseMessage GetReimbursementDetails(string travelRequestId)
        {
            HttpResponseMessage response = null;

            try
            {
                ReimbursementInput result = reimbursementService.GetReimbursementDetails(travelRequestId);
                response = Request.CreateResponse(HttpStatusCode.OK, result);
            }
            catch (Exception ex)
            {
                LogMessage.Log("api / reimburse /{ travelRequestId} :" + ex.Message);
                response = Request.CreateResponse(HttpStatusCode.InternalServerError, "Couldn't retrive reiumbursement details for the given  Id : " + ex.Message);
            }
            return(response);
        }
Esempio n. 3
0
        public HttpResponseMessage SaveReimbursement(ReimbursementInput reimbursementRequest)
        {
            HttpResponseMessage response = null;

            try
            {
                var result = reimbursementService.SaveTravelRequestReimbursement(reimbursementRequest);
                var data   = new JavaScriptSerializer().Serialize(result);

                response = Request.CreateResponse(HttpStatusCode.OK, data);
            }
            catch (Exception ex)
            {
                LogMessage.Log("api/reimburse/save :" + ex.Message);
                response = Request.CreateResponse(HttpStatusCode.InternalServerError, "Couldn't save travel request : " + ex.Message);
            }
            return(response);
        }