Exemple #1
0
        private void AddEventInfo_Click(object sender, RoutedEventArgs e)
        {
            EventInfo p = new EventInfo();

            if (p.ShowDialog().Value)
            {
                Event AddEvent = new Event();
                AddEvent.EventName = p.EName.Text;
                AddEvent.EventCost = Decimal.Parse(p.ECost.Text);
                AddEvent.UserID = userId;
                infoContext.Events.AddObject(AddEvent);
                saveMeToDataBase();
                fetchUserData(infoContext);
            }
        }
 /// <summary>
 /// Create a new Event object.
 /// </summary>
 /// <param name="eventId">Initial value of the EventId property.</param>
 public static Event CreateEvent(global::System.Int32 eventId)
 {
     Event @event = new Event();
     @event.EventId = eventId;
     return @event;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Events EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToEvents(Event @event)
 {
     base.AddObject("Events", @event);
 }