private static void LoadCaches()
        {
            var stationBll = new BaseStationBll();
            var trainNoBll = new TrainNoBll();

            _stationCaches = stationBll.QueryList("IsDelete=0").ToList();
            _trainNoCaches = trainNoBll.QueryList("IsDelete=0").ToList();
        }
Beispiel #2
0
        public JsonResult SearchStations(string key)
        {
            if (string.IsNullOrEmpty(key))
            {
                return(Json(ErrorModel.InputError));
            }

            var stationBll = new BaseStationBll();

            var condition = string.Format("IsDelete=0 AND Spell LIKE '{0}%' OR StationName LIKE '%{0}%' OR SN LIKE '%{0}%'", key);
            var stations  = stationBll.QueryList(condition);

            return(Json(ErrorModel.GetDataSuccess(stations)));
        }