public HttpResponseMessage GetBalanceSheetBudgetOfficer(HttpRequestMessage request, int balancesheetBudgetId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                BalanceSheetBudgetOfficer balancesheetBudget = _MPRBSService.GetBalanceSheetBudgetOfficer(balancesheetBudgetId);

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

                return response;
            }));
        }
        public HttpResponseMessage DeleteBalanceSheetBudgetOfficer(HttpRequestMessage request, [FromBody] int balancesheetBudgetId)
        {
            return(GetHttpResponse(request, () =>
            {
                HttpResponseMessage response = null;

                // not that calling the WCF service here will authenticate access to the data
                BalanceSheetBudgetOfficer balancesheetBudget = _MPRBSService.GetBalanceSheetBudgetOfficer(balancesheetBudgetId);

                if (balancesheetBudget != null)
                {
                    _MPRBSService.DeleteBalanceSheetBudgetOfficer(balancesheetBudgetId);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateBalanceSheetBudgetOfficer(HttpRequestMessage request, [FromBody] BalanceSheetBudgetOfficer balancesheetBudgetModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var balancesheetBudget = _MPRBSService.UpdateBalanceSheetBudgetOfficer(balancesheetBudgetModel);

                return request.CreateResponse <BalanceSheetBudgetOfficer>(HttpStatusCode.OK, balancesheetBudget);
            }));
        }
 public BalanceSheetBudgetOfficer UpdateBalanceSheetBudgetOfficer(BalanceSheetBudgetOfficer balanceSheetBudgetOfficer)
 {
     return(Channel.UpdateBalanceSheetBudgetOfficer(balanceSheetBudgetOfficer));
 }