Inheritance: System.Data.Objects.DataClasses.EntityObject
 /// <summary>
 /// Create a new Track object.
 /// </summary>
 /// <param name="trackID">Initial value of the TrackID property.</param>
 /// <param name="track1">Initial value of the Track1 property.</param>
 /// <param name="typeID">Initial value of the TypeID property.</param>
 public static Track CreateTrack(global::System.Int32 trackID, global::System.String track1, global::System.Int32 typeID)
 {
     Track track = new Track();
     track.TrackID = trackID;
     track.Track1 = track1;
     track.TypeID = typeID;
     return track;
 }
Beispiel #2
0
 private void trackNew_Click(object sender, RoutedEventArgs e)
 {
     if (yardComboBox.Items.Count < 1)
     {
         MessageBox.Show("Please Create Yards");
         return;
     }
     trackTypeComboBox.IsEnabled = true;
     yardComboBox.IsEnabled = true;
     trackNew.IsEnabled = false;
     theTrack = new Track();
     theYard = yardComboBox.SelectedItem as TrainTracker.Web.Models.RailYard;
     theTrackType = trackTypeComboBox.SelectedItem as TrainTracker.Web.Models.TrackType;
     theTrack.YardId = theYard.YardID;
     theTrack.LocationID = thisLocation;
     theTrack.TypeID = theTrackType.TypeID;
     trackDomainDataSource.DataView.Add(theTrack);
     trackCancel.IsEnabled = true;
     trackFilter.IsEnabled = false;
     typeFilter.IsEnabled = false;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Tracks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTracks(Track track)
 {
     base.AddObject("Tracks", track);
 }