public HttpResponseMessage DeleteLateFeeDetails(int id) { LateFeeDetailsRepository ctxLateFeeDetails = new LateFeeDetailsRepository(); ctxLateFeeDetails.DeleteLateFeeDetails(id); HttpResponseMessage ms = Request.CreateResponse(HttpStatusCode.Accepted); return(ms); }
public HttpResponseMessage UpdateLateFeeDetails([FromBody] LateFeeDetails _LateFeeDetails) { LateFeeDetailsRepository ctxLateFeeDetails = new LateFeeDetailsRepository(); ctxLateFeeDetails.UpdateLateFeeDetails(_LateFeeDetails); HttpResponseMessage ms = Request.CreateResponse(HttpStatusCode.OK); ms.Headers.Location = new Uri(Request.RequestUri + "/" + (_LateFeeDetails.LateFeeDetailID).ToString()); return(ms); }
public HttpResponseMessage GetAllLateFeeDetails() { LateFeeDetailsRepository ctxLateFeeDetails = new LateFeeDetailsRepository(); IEnumerable <LateFeeDetails> lsLateFeeDetails; lsLateFeeDetails = ctxLateFeeDetails.GetLateFeeDetails(); if (lsLateFeeDetails.Count() > 0) { return(Request.CreateResponse(HttpStatusCode.OK, lsLateFeeDetails)); } { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Item not found")); } }
public HttpResponseMessage GetLateFeeDetailByID(int id) { LateFeeDetailsRepository ctxLateFeeDetails = new LateFeeDetailsRepository(); LateFeeDetails _LibMemeberShip = ctxLateFeeDetails.GetLateFeeDetails().FirstOrDefault(x => x.LateFeeDetailID == id); if (_LibMemeberShip != null) { return(Request.CreateResponse(HttpStatusCode.OK, _LibMemeberShip)); } { return(Request.CreateErrorResponse(HttpStatusCode.NotFound, "Item not found")); } }