Beispiel #1
0
 /// <summary>
 /// Funkce volana pri odebrani do seznamu zaznamu v planu.
 /// </summary>
 /// <param name="schedule">
 /// Plan ktery se odebira ze seznamu.
 /// </param>
 private void removeSchedulesRef(Schedule schedule)
 {
     OnPropertyChanging();
     schedule.ActivityRef = null;
 }
Beispiel #2
0
 public void deleteSchedule(Schedule schedule)
 {
     if (schedule.ActivityRef != null) { schedule.ActivityRef.SchedulesRef.Remove(schedule); }
     AllScheduleItems.Remove(schedule);
     db.Schedules.DeleteOnSubmit(schedule);
     db.SubmitChanges();
 }
Beispiel #3
0
 /// <summary>
 /// Funkce volana pri pridani do seznamu zaznamu v planu.
 /// </summary>
 /// <param name="schedule">
 /// Plan ktery se prirazuje k seznamu.
 /// </param>
 private void addSchedulesRef(Schedule schedule)
 {
     OnPropertyChanging();
     schedule.ActivityRef = this;
 }
Beispiel #4
0
 public void CreateSchedule(Activity activity)
 {
     int order = 1;
     if (db.Schedules.Count() != 0) { order = db.Schedules.Max(x => x.Order) + 1; };    
     Schedule schedule = new Schedule { Order = order };
     db.Schedules.InsertOnSubmit(schedule);
     activity.SchedulesRef.Add(schedule);
     db.SubmitChanges();
     AllScheduleItems.Add(schedule);
 }