private void FilterList(string courseFilter) { if (string.IsNullOrEmpty(courseFilter)) { AllCoursesList = new ObservableCollection <Course>(Barrel.Current.Get <List <Course> >("AllCourseList")); } else { List <Course> TempList = AllCoursesList.ToList(); foreach (Course CurrentCourse in TempList) { if (!CurrentCourse.CourseID.Contains(courseFilter) && !CurrentCourse.CourseName.Contains(courseFilter) && !CurrentCourse.CourseTeacher.Contains(courseFilter)) { AllCoursesList.Remove(CurrentCourse); } } } }
internal Course FindCourseByID(int searchedID) { return(AllCoursesList.Find(x => x.UniqueIdetifier == searchedID)); }