Ejemplo n.º 1
0
        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));
            }
        }
Ejemplo n.º 2
0
        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));
            }
        }