public HttpResponseMessage GetPLIncomeReportAdjustment(HttpRequestMessage request, int plIncomeReportAdjustmentId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; PLIncomeReportAdjustment plIncomeReportAdjustment = _MPRPLService.GetPLIncomeReportAdjustment(plIncomeReportAdjustmentId); // notice no need to create a seperate model object since PLIncomeReportAdjustment entity will do just fine response = request.CreateResponse <PLIncomeReportAdjustment>(HttpStatusCode.OK, plIncomeReportAdjustment); return response; })); }
public HttpResponseMessage DeletePLIncomeReportAdjustment(HttpRequestMessage request, [FromBody] int plIncomeReportAdjustmentId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data PLIncomeReportAdjustment plIncomeReportAdjustment = _MPRPLService.GetPLIncomeReportAdjustment(plIncomeReportAdjustmentId); if (plIncomeReportAdjustment != null) { _MPRPLService.DeletePLIncomeReportAdjustment(plIncomeReportAdjustmentId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No plIncomeReportAdjustment found under that ID."); } return response; })); }
public HttpResponseMessage UpdatePLIncomeReportAdjustment(HttpRequestMessage request, [FromBody] PLIncomeReportAdjustment plIncomeReportAdjustmentModel) { return(GetHttpResponse(request, () => { var plIncomeReportAdjustment = _MPRPLService.UpdatePLIncomeReportAdjustment(plIncomeReportAdjustmentModel); return request.CreateResponse <PLIncomeReportAdjustment>(HttpStatusCode.OK, plIncomeReportAdjustment); })); }
public PLIncomeReportAdjustment UpdatePLIncomeReportAdjustment(PLIncomeReportAdjustment plIncomeReportAdjustment) { return(Channel.UpdatePLIncomeReportAdjustment(plIncomeReportAdjustment)); }