public void LoadTermine(DateTime VDate, DateTime bDate) { db.Refresh(System.Data.Objects.RefreshMode.StoreWins, db.CRMTermine); if (TermineIsChecked) { //TermineListe = new ObservableCollection<CRMTermine>(db.CRMTermine.Where(t => t.TerminVon >= VDate && t.TerminVon <= bDate && t.AppointmentType == "Termin").OrderBy(t => t.TerminVon)); TermineListe = new ObservableCollection <CRMTermine>(db.CRMTermine.Where(t => t.TerminBis >= VDate && t.TerminVon <= bDate && t.AppointmentType == "Termin").OrderBy(t => t.TerminVon)); } else { TermineListe = new ObservableCollection <CRMTermine>(db.CRMTermine.Where(t => t.TerminBis >= VDate && t.TerminVon <= bDate && t.AppointmentType == "Aufgabe" && t.Angelegt == DAL.Session.User.id).OrderBy(t => t.TerminVon)); } }