Exemple #1
0
        public void AddWagon(int id)
        {
            var wagon = new Wagon(this, id);

            Wagons.Add(wagon);
            TrainsManager.SaveTrains();
        }
Exemple #2
0
 public void DeleteWagon(Wagon wagon)
 {
     if (wagon.Seats.Any(s => s.IsBookedAnyDate()))
     {
         return;
     }
     Wagons.Remove(wagon);
     TrainsManager.SaveTrains();
 }