Пример #1
0
        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);
        }
Пример #2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the EventClasses EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEventClasses(EventClass eventClass)
 {
     base.AddObject("EventClasses", eventClass);
 }
Пример #3
0
 /// <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;
 }