Exemplo n.º 1
0
 public void AddTrainStation(TrainStation TrainStation)
 {
     TrainStations.Add(TrainStation);
     foreach (var item in TrainStations.Where(o => o.Order >= TrainStation.Order))
     {
         item.SetOrder(item.Order + 1);
     }
 }
Exemplo n.º 2
0
 public void AddTrainStation(TrainStation TrainStation)
 {
     if (TrainStations == null)
     {
         TrainStations = new List <TrainStation>();
     }
     TrainStations.Add(TrainStation);
     foreach (var item in TrainStations.Where(o => o.Order >= TrainStation.Order))
     {
         item.SetOrder(item.Order + 1);
     }
 }