Inheritance: System.Data.Objects.DataClasses.EntityObject
コード例 #1
0
 private void carTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (!carNew.IsEnabled)
     {
         theType = carTypeComboBox.SelectedItem as TrainTracker.Web.Models.RailCarType;
         theCar.Type = theType.TypeID;
     }
 }
コード例 #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the RailCarTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToRailCarTypes(RailCarType railCarType)
 {
     base.AddObject("RailCarTypes", railCarType);
 }
コード例 #3
0
ファイル: RailCar.xaml.cs プロジェクト: vega670/TrainTracker
 private void typeNew_Click(object sender, RoutedEventArgs e)
 {
     typeNew.IsEnabled = false;
     var type = new TrainTracker.Web.Models.RailCarType();
     railCarTypeDomainDataSource.DataView.Add(type);
     typeSave.IsEnabled = true;
     typeCancel.IsEnabled = true;
     typeFilter.IsEnabled = false;
 }
コード例 #4
0
 /// <summary>
 /// Create a new RailCarType object.
 /// </summary>
 /// <param name="typeID">Initial value of the TypeID property.</param>
 /// <param name="type">Initial value of the Type property.</param>
 public static RailCarType CreateRailCarType(global::System.Int32 typeID, global::System.String type)
 {
     RailCarType railCarType = new RailCarType();
     railCarType.TypeID = typeID;
     railCarType.Type = type;
     return railCarType;
 }