Inheritance: System.Data.Objects.DataClasses.EntityObject
Ejemplo n.º 1
0
 private void trackTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (!trackNew.IsEnabled)
     {
         theTrackType = trackTypeComboBox.SelectedItem as TrainTracker.Web.Models.TrackType;
         theTrack.TypeID = theTrackType.TypeID;
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Create a new TrackType object.
 /// </summary>
 /// <param name="typeID">Initial value of the TypeID property.</param>
 /// <param name="typeCode">Initial value of the TypeCode property.</param>
 /// <param name="typeName">Initial value of the TypeName property.</param>
 public static TrackType CreateTrackType(global::System.Int32 typeID, global::System.String typeCode, global::System.String typeName)
 {
     TrackType trackType = new TrackType();
     trackType.TypeID = typeID;
     trackType.TypeCode = typeCode;
     trackType.TypeName = typeName;
     return trackType;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the TrackTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToTrackTypes(TrackType trackType)
 {
     base.AddObject("TrackTypes", trackType);
 }