public HttpResponseMessage TeamStructureALLTop1(HttpRequestMessage request, string branch, string defcode, int year) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; TeamStructureALL ts = _MPRCoreService.GetTeamStructureALLTop1(branch, defcode, year); response = request.CreateResponse <TeamStructureALL>(HttpStatusCode.OK, ts); return response; })); }
public HttpResponseMessage GetRatios(HttpRequestMessage request, int Team_StructureId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; TeamStructureALL ts = _MPRCoreService.GetTeamStructureALL(Team_StructureId); // notice no need to create a seperate model object since CaptionMapping entity will do just fine response = request.CreateResponse <TeamStructureALL>(HttpStatusCode.OK, ts); return response; })); }
public HttpResponseMessage DeleteTeamStructureALL(HttpRequestMessage request, [FromBody] int Team_StructureId) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // not that calling the WCF service here will authenticate access to the data TeamStructureALL ts = _MPRCoreService.GetTeamStructureALL(Team_StructureId); if (ts != null) { _MPRCoreService.DeleteTeamStructureALL(Team_StructureId); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No Team Structure found under the ID."); } return response; })); }
public HttpResponseMessage UpdateTeamStructureALL(HttpRequestMessage request, [FromBody] TeamStructureALL tsModel) { return(GetHttpResponse(request, () => { var ts = _MPRCoreService.UpdateTeamStructureALL(tsModel); return request.CreateResponse <TeamStructureALL>(HttpStatusCode.OK, ts); })); }