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

                OpexStaffcostDetail opex = _MPROPEXService.GetOpexStaffcostDetail(ID);

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

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

                // not that calling the WCF service here will authenticate access to the data
                OpexStaffcostDetail opex = _MPROPEXService.GetOpexStaffcostDetail(ID);

                if (opex != null)
                {
                    //_MPROPEXService.DeleteActivityBase(ID);
                    _MPROPEXService.DeleteOpexStaffcostDetail(ID);

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

                return response;
            }));
        }
        public HttpResponseMessage UpdateOpexStaffcostDetail(HttpRequestMessage request, [FromBody] OpexStaffcostDetail opexModel)
        {
            return(GetHttpResponse(request, () =>
            {
                var opex = _MPROPEXService.UpdateOpexStaffcostDetail(opexModel);

                return request.CreateResponse <OpexStaffcostDetail>(HttpStatusCode.OK, opex);
            }));
        }
 public OpexStaffcostDetail UpdateOpexStaffcostDetail(OpexStaffcostDetail opexStaffcostDetail)
 {
     return(Channel.UpdateOpexStaffcostDetail(opexStaffcostDetail));
 }