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

                IfrsCustomerAccount ifrscustomeraccount = _IFRSDataService.GetIfrsCustomerAccount(IfrsCustomerAccountId);

                // notice no need to create a seperate model object since Setup entity will do just fine
                return request.CreateResponse <IfrsCustomerAccount>(HttpStatusCode.OK, ifrscustomeraccount);
            }));
        }
Beispiel #2
0
        public HttpResponseMessage DeleteIfrsCustomerAccount(HttpRequestMessage request, [FromBody] int IfrsCustomerAccountId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                IfrsCustomerAccount ifrscustomeraccount = _IFRSDataService.GetIfrsCustomerAccount(IfrsCustomerAccountId);

                if (ifrscustomeraccount != null)
                {
                    _IFRSDataService.DeleteIfrsCustomerAccount(IfrsCustomerAccountId);

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

                return response;
            }));
        }
Beispiel #3
0
 public IfrsCustomerAccount UpdateIfrsCustomerAccount(IfrsCustomerAccount ifrsCustomerAccount)
 {
     return(Channel.UpdateIfrsCustomerAccount(ifrsCustomerAccount));
 }
Beispiel #4
0
        public HttpResponseMessage UpdateIfrsCustomerAccount(HttpRequestMessage request, [FromBody] IfrsCustomerAccount IfrsCustomerAccountModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var IfrsCustomerAccount = _IFRSDataService.UpdateIfrsCustomerAccount(IfrsCustomerAccountModel);

                return request.CreateResponse <IfrsCustomerAccount>(HttpStatusCode.OK, IfrsCustomerAccount);
            }));
        }