Пример #1
0
 public bool AddEvent(AEvent tourEvent)
 {
     using (DataClassesTourGuideDataContext dc = new DataClassesTourGuideDataContext())
     {
         Event newEvent = new Event();
         newEvent.TourID = System.Guid.Parse(tourEvent.TourID);
         newEvent.TourDate = tourEvent.TourDate;
         newEvent.TourGuide = tourEvent.TourGuide;
         newEvent.IsOn = (byte)(tourEvent.IsOn? 1 : 0);
         dc.Events.InsertOnSubmit(newEvent);
         dc.SubmitChanges();
         return true;
     }
 }
		private void detach_Events(Event entity)
		{
			this.SendPropertyChanging();
			entity.Tour = null;
		}
		private void attach_Events(Event entity)
		{
			this.SendPropertyChanging();
			entity.Tour = this;
		}
 partial void DeleteEvent(Event instance);
 partial void UpdateEvent(Event instance);
 partial void InsertEvent(Event instance);