private void carTypeComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (!carNew.IsEnabled) { theType = carTypeComboBox.SelectedItem as TrainTracker.Web.Models.RailCarType; theCar.Type = theType.TypeID; } }
/// <summary> /// Deprecated Method for adding a new object to the RailCarTypes EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToRailCarTypes(RailCarType railCarType) { base.AddObject("RailCarTypes", railCarType); }
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; }
/// <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; }