Ejemplo n.º 1
0
        public HttpResponseMessage UpdateIncomeNEAGLSBU(HttpRequestMessage request, [FromBody] IncomeNEAGLSBU incomeNEAGLSBUModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var incomeNEAGLSBU = _MPROPEXService.UpdateIncomeNEAGLSBU(incomeNEAGLSBUModel);

                return request.CreateResponse <IncomeNEAGLSBU>(HttpStatusCode.OK, incomeNEAGLSBU);
            }));
        }
Ejemplo n.º 2
0
        public HttpResponseMessage GetIncomeNEAGLSBU(HttpRequestMessage request, int incomeNEAGLSBUId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                IncomeNEAGLSBU incomeNEAGLSBU = _MPROPEXService.GetIncomeNEAGLSBU(incomeNEAGLSBUId);

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

                return response;
            }));
        }
Ejemplo n.º 3
0
        public HttpResponseMessage DeleteIncomeNEAGLSBU(HttpRequestMessage request, [FromBody] int incomeNEAGLSBUId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                IncomeNEAGLSBU incomeNEAGLSBU = _MPROPEXService.GetIncomeNEAGLSBU(incomeNEAGLSBUId);

                if (incomeNEAGLSBU != null)
                {
                    _MPROPEXService.DeleteIncomeNEAGLSBU(incomeNEAGLSBUId);

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

                return response;
            }));
        }
 public IncomeNEAGLSBU UpdateIncomeNEAGLSBU(IncomeNEAGLSBU incomeNEAGLSBU)
 {
     return(Channel.UpdateIncomeNEAGLSBU(incomeNEAGLSBU));
 }