public HttpResponseMessage Updatemprcommfee(HttpRequestMessage request, [FromBody] MPRCommFee mprcommfeeModel) { return(GetHttpResponse(request, () => { var mprcommfee = _MPRPLService.UpdateMPRCommFee(mprcommfeeModel); return request.CreateResponse <MPRCommFee>(HttpStatusCode.OK, mprcommfee); })); }
public HttpResponseMessage Getmprcommfee(HttpRequestMessage request, int CommFee_Id) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; MPRCommFee mprcommfee = _MPRPLService.GetMPRCommFee(CommFee_Id); // notice no need to create a seperate model object since MPRCommFee entity will do just fine response = request.CreateResponse <MPRCommFee>(HttpStatusCode.OK, mprcommfee); return response; })); }
public HttpResponseMessage Deletemprcommfee(HttpRequestMessage request, [FromBody] int CommFee_Id) { return(GetHttpResponse(request, () => { HttpResponseMessage response = null; // note that calling the WCF service here will authenticate access to the data MPRCommFee mprcommfee = _MPRPLService.GetMPRCommFee(CommFee_Id); if (mprcommfee != null) { _MPRPLService.DeleteMPRCommFee(CommFee_Id); response = request.CreateResponse(HttpStatusCode.OK); } else { response = request.CreateErrorResponse(HttpStatusCode.NotFound, "No MPR Commission & Fee found under that ID."); } return response; })); }
public MPRCommFee UpdateMPRCommFee(MPRCommFee mprcommfee) { return(Channel.UpdateMPRCommFee(mprcommfee)); }