public HttpResponseMessage DeleteActivityBase(HttpRequestMessage request, [FromBody] int activityBaseId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                ActivityBase activityBase = _MPROPEXService.GetActivityBase(activityBaseId);

                if (activityBase != null)
                {
                    _MPROPEXService.DeleteActivityBase(activityBaseId);

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

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

                // not that calling the WCF service here will authenticate access to the data
                OpexGLBasis2 opex = _MPROPEXService.GetOpexGLBasis2(ID);

                if (opex != null)
                {
                    _MPROPEXService.DeleteActivityBase(ID);

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

                return response;
            }));
        }