示例#1
0
        public HttpResponseMessage GetSetup(HttpRequestMessage request, int obeId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                OffBalanceSheetExposure offbalancesheetexposure = _IFRSDataService.GetOffBalanceSheetExposure(obeId);

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

                return response;
            }));
        }
示例#2
0
        public HttpResponseMessage Deleteoffbalancesheetexposure(HttpRequestMessage request, [FromBody] int obeId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                OffBalanceSheetExposure offbalancesheetexposure = _IFRSDataService.GetOffBalanceSheetExposure(obeId);

                if (offbalancesheetexposure != null)
                {
                    _IFRSDataService.DeleteOffBalanceSheetExposure(obeId);

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

                return response;
            }));
        }
示例#3
0
        public HttpResponseMessage Updateoffbalancesheetexposure(HttpRequestMessage request, [FromBody] OffBalanceSheetExposure offbalancesheetexposureModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var offbalancesheetexposure = _IFRSDataService.UpdateOffBalanceSheetExposure(offbalancesheetexposureModel);

                return request.CreateResponse <OffBalanceSheetExposure>(HttpStatusCode.OK, offbalancesheetexposure);
            }));
        }
示例#4
0
 public OffBalanceSheetExposure UpdateOffBalanceSheetExposure(OffBalanceSheetExposure offBalanceSheetExposure)
 {
     return(Channel.UpdateOffBalanceSheetExposure(offBalanceSheetExposure));
 }