Esempio n. 1
0
        public HttpResponseMessage GetNEABranchSharingRatio(HttpRequestMessage request, int nEABranchSharingRatioId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                NEABranchSharingRatio nEABranchSharingRatio = _MPROPEXService.GetNEABranchSharingRatio(nEABranchSharingRatioId);

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

                return response;
            }));
        }
Esempio n. 2
0
        public HttpResponseMessage DeleteNEABranchSharingRatio(HttpRequestMessage request, [FromBody] int nEABranchSharingRatioId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                NEABranchSharingRatio nEABranchSharingRatio = _MPROPEXService.GetNEABranchSharingRatio(nEABranchSharingRatioId);

                if (nEABranchSharingRatio != null)
                {
                    _MPROPEXService.DeleteNEABranchSharingRatio(nEABranchSharingRatioId);

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

                return response;
            }));
        }
Esempio n. 3
0
        public HttpResponseMessage UpdateNEABranchSharingRatio(HttpRequestMessage request, [FromBody] NEABranchSharingRatio nEABranchSharingRatioModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var nEABranchSharingRatio = _MPROPEXService.UpdateNEABranchSharingRatio(nEABranchSharingRatioModel);

                return request.CreateResponse <NEABranchSharingRatio>(HttpStatusCode.OK, nEABranchSharingRatio);
            }));
        }
 public NEABranchSharingRatio UpdateNEABranchSharingRatio(NEABranchSharingRatio nEABranchSharingRatio)
 {
     return(Channel.UpdateNEABranchSharingRatio(nEABranchSharingRatio));
 }