Ejemplo n.º 1
0
        public HttpResponseMessage DeleteKPIActualMap(HttpRequestMessage request, [FromBody] int kpiActualMapId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                SCDKPIActualMap kpiActualMap = _ScorecardService.GetSCDKPIActualMap(kpiActualMapId);

                if (kpiActualMap != null)
                {
                    _ScorecardService.DeleteSCDKPIActualMap(kpiActualMapId);

                    response = request.CreateResponse(HttpStatusCode.OK);
                }
                else
                {
                    response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No kpiActualMap found under that ID.");
                }

                return response;
            }));
        }