public HttpResponseMessage GetWorkReportList(IdViewModel idViewModel) { var response = inwardOutwardService.GetWorkReportList(idViewModel); if (response.IsSuccess) { return(Request.CreateResponse(HttpStatusCode.OK, response, "application/json")); } else { return(Request.CreateResponse(HttpStatusCode.BadRequest, response, "application/json")); } }
public ActionResult GetWorkReportPdf(string UserId) { List <WorkReportsVM> WorkReportsList = new List <WorkReportsVM>(); //object WorkReportsList; try { IdViewModel IDVM = new IdViewModel(); IDVM.UserId = UserId; IDVM.FormType = "workreport"; var list = iInwardOutwardService.GetWorkReportList(IDVM); if (list != null & list.IsSuccess && list.Content != null) { //WorkReportsList = list.Content; WorkReportsList = (List <WorkReportsVM>)list.Content; } } catch (Exception ex) { throw ex; } return(View(WorkReportsList)); }