public string SaveTravelRequestReimbursement(ReimbursementInput reimbursementRequest) { try { string reimbursementId = reimbursementRepository.SaveTravelRequestReimbursement(reimbursementRequest); return(reimbursementId); } catch (Exception ex) { throw new Exception(ex.Message); } }
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); }
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); }