public IActionResult GetAllHistorys() { string errorString = null; try { RouteHistoryModel historyModel = new RouteHistoryModel(); List <RouteHistory> obj = historyModel.GetAllRouteHistories(out errorString); if (obj != null && errorString == null) { return(new JsonResult(obj)); } else { return(BadRequest("cant find")); } } catch (Exception e) { return(Ok(e + "\n" + errorString)); } }
public IActionResult GetHistorybyorgid(int orgid) { string errorString = null; try { RouteHistoryModel historyModel = new RouteHistoryModel(); List <RouteHistory> obj = historyModel.GetRouteHistoryListByOrgId(orgid, out errorString); if (obj != null && errorString == null) { return(new JsonResult(obj)); } else { return(BadRequest("cant find")); } } catch (Exception e) { return(Ok(e + "\n" + errorString)); } }