public HttpResponseMessage DeleteincomeCentralVaultSchedule(HttpRequestMessage request, [FromBody] int incomeCentralVaultScheduleId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data IncomeCentralVaultSchedule incomecentralvaultschedule = _MPRPLService.GetIncomeCentralVaultSchedule(incomeCentralVaultScheduleId); if (incomecentralvaultschedule != null) { _MPRPLService.DeleteRevenue(incomeCentralVaultScheduleId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No incomecentralvaultschedule found under that ID."); } return response; })); }
public HttpResponseMessage Deleterevenue(HttpRequestMessage request, [FromBody] int revenueId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data Revenue revenue = _MPRPLService.GetRevenue(revenueId); if (revenue != null) { _MPRPLService.DeleteRevenue(revenueId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No revenue found under that ID."); } return response; })); }