Exemplo n.º 1
0
 private void AddLocomotiveAction()
 {
     if (AddLocomotive == null)
     {
         return;
     }
     database.AddAndSave(AddLocomotive);
     AddLocomotive = new Locomotive();
     LoadLocomotiveList();
     ShowMessage();
 }
Exemplo n.º 2
0
 private void AddWagonAction()
 {
     if (AddWagon == null)
     {
         return;
     }
     database.AddAndSave(AddWagon);
     LoadWagonList();
     ShowMessage();
     AddWagon = new Wagon();
 }
Exemplo n.º 3
0
        private void AddTrack()
        {
            if (AddTrackCount == 0 || AddTrackPartNumber == 0)
            {
                return;
            }
            Track t = new Track()
            {
                PartNumber = AddTrackPartNumber, Count = AddTrackCount
            };

            database.AddAndSave(t);
            AddTrackCount      = 0;
            AddTrackPartNumber = 0;
            ShowMessage();
            LoadTrackList();
        }