예제 #1
0
 private void AddLocomotiveAction()
 {
     if (AddLocomotive == null)
     {
         return;
     }
     database.AddAndSave(AddLocomotive);
     AddLocomotive = new Locomotive();
     LoadLocomotiveList();
     ShowMessage();
 }
예제 #2
0
 private void AddWagonAction()
 {
     if (AddWagon == null)
     {
         return;
     }
     database.AddAndSave(AddWagon);
     LoadWagonList();
     ShowMessage();
     AddWagon = new Wagon();
 }
예제 #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();
        }