Beispiel #1
0
        public HttpResponseMessage GetScoreCardSetMetricTargetKBL(HttpRequestMessage request, int ID)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                ScoreCardSetMetricTargetKBL scm = _MPRCoreService.GetScoreCardSetMetricTargetKBL(ID);

                // notice no need to create a seperate model object since CaptionMapping entity will do just fine
                response = request.CreateResponse <ScoreCardSetMetricTargetKBL>(HttpStatusCode.OK, scm);

                return response;
            }));
        }
Beispiel #2
0
        public HttpResponseMessage DeleteScoreCardSetMetricTargetKBL(HttpRequestMessage request, [FromBody] int ID)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                ScoreCardSetMetricTargetKBL scm = _MPRCoreService.GetScoreCardSetMetricTargetKBL(ID);

                if (scm != null)
                {
                    _MPRCoreService.DeleteScoreCardSetMetricTargetKBL(ID);

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

                return response;
            }));
        }
Beispiel #3
0
        public HttpResponseMessage UpdateScoreCardSetMetricTargetKBL(HttpRequestMessage request, [FromBody] ScoreCardSetMetricTargetKBL scmModel)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                var scm = _MPRCoreService.UpdateScoreCardSetMetricTargetKBL(scmModel);

                //var response =  request.CreateResponse<ProductTransferPrice>(HttpStatusCode.OK, scm);
                response = request.CreateResponse <ScoreCardSetMetricTargetKBL>(HttpStatusCode.OK, scm);

                return response;
            }));
        }