Ejemplo n.º 1
0
        public void getStationList()
        {
            StationContext context = new StationContext();

            stationList = context.getStationList(Attachtype);
            lineStationList.ForEach(x =>
            {
                var model = stationList.FirstOrDefault(s => s.stationName == x.stationName && s.derection == x.derection);
                if (model != null)
                {
                    x.attach       = 1;
                    x.newStationId = model.stationId;
                }
            });
            log.Info($"站点个数共{stationList.Count}");
            if (Attachtype == 1)
            {
                log.Info($"需要修改的上下行共{lineStationList.Where(x => x.attach == 1).Count()}条");
                lineStationList.Where(x => x.attach == 1).OrderBy(x => x.lineName).ToList().ForEach(x => log.Info($"{x.lineName},{x.stationName},{x.derection}"));
            }
            else
            {
                log.Info($"需要修改的线路共{lineStationList.Where(x => x.attach == 1).GroupBy(x => x.lineName).Count()}条");
                lineStationList.Where(x => x.attach == 1).GroupBy(x => x.lineName).ToList().ForEach(x => log.Info(x.Key));
            }
        }
Ejemplo n.º 2
0
        public void deleteStations()
        {
            StationContext context = new StationContext();

            context.deleteStations();
        }
Ejemplo n.º 3
0
        public int getDeleteStationCount()
        {
            StationContext context = new StationContext();

            return(context.getDeleteStationCount());
        }