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