Inheritance: System.Data.Objects.DataClasses.EntityObject
Example #1
0
 private void yardComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (!trackNew.IsEnabled)
     {
         theYard = yardComboBox.SelectedItem as TrainTracker.Web.Models.RailYard;
         theTrack.YardId = theYard.YardID;
     }
 }
 /// <summary>
 /// Create a new RailYard object.
 /// </summary>
 /// <param name="yardID">Initial value of the YardID property.</param>
 /// <param name="yardCode">Initial value of the YardCode property.</param>
 /// <param name="yardName">Initial value of the YardName property.</param>
 public static RailYard CreateRailYard(global::System.Int32 yardID, global::System.String yardCode, global::System.String yardName)
 {
     RailYard railYard = new RailYard();
     railYard.YardID = yardID;
     railYard.YardCode = yardCode;
     railYard.YardName = yardName;
     return railYard;
 }
Example #3
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 RailYards EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRailYards(RailYard railYard)
 {
     base.AddObject("RailYards", railYard);
 }