public HttpResponseMessage GetPaySlipBookOnDemand(int UserId, string BookNo, string Type) { try { using (CarSystemEntities db = new CarSystemEntities()) { //var returnData = db.prGetPaySlipDetails(UserId, 0, BookNo, Type).ToList(); var returnData = db.prGetPaySlip(UserId, 0, BookNo, Type).ToList(); return(Request.CreateResponse(HttpStatusCode.OK, returnData)); } } catch (Exception ex) { return(Request.CreateResponse(HttpStatusCode.BadRequest, "System has failed to show pay slip list. Please contact with admin.")); } }