private void SaveCompetitor_Click(object sender, RoutedEventArgs e) { EventClass eventClass = new EventClass(); eventClass = (cmbxEventClass.SelectedItem as EventClass); string status = (cmbxCompetitorStatus.SelectedItem != null) ? cmbxCompetitorStatus.SelectedItem.ToString() : ""; string vehicleType = string.Copy(txbxVehicleType.Text); string vehicleModel = string.Copy(txbxVehicleModel.Text); int vehicleCC = 0; int.TryParse(txbxVehicleCC.Text, out vehicleCC); Presenter.AddAtleteToCompetitorsList(Presenter.ApplicationPresenter.AllAthletesPresenter.CurrentAthlete, eventClass, status, vehicleType, vehicleModel, vehicleCC); }
/// <summary> /// Deprecated Method for adding a new object to the EventClasses EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToEventClasses(EventClass eventClass) { base.AddObject("EventClasses", eventClass); }
/// <summary> /// Create a new EventClass object. /// </summary> /// <param name="id">Initial value of the Id property.</param> /// <param name="eventId">Initial value of the EventId property.</param> /// <param name="classId">Initial value of the ClassId property.</param> public static EventClass CreateEventClass(global::System.Int64 id, global::System.Int64 eventId, global::System.Int64 classId) { EventClass eventClass = new EventClass(); eventClass.Id = id; eventClass.EventId = eventId; eventClass.ClassId = classId; return eventClass; }