public void FilterStudentYear() { // If there's a valid selection aka if something other than "None" or NULL is selected then filter if (IsClearable()) { StudentInformationCollection.Clear(); var studentInfoStudentYear = AllStudentInformation.Where(i => i.SstudentYear == SelectedStudentYear.StudentYearDescription).ToList(); NumberOfStudents = studentInfoStudentYear.Count(); foreach (var info in studentInfoStudentYear) { StudentInformationCollection.Add(info); } } }
public void FilterOnLastName() { // If there's a valid selection aka if something other than "None" or NULL is selected then filter if (IsClearable()) { StudentInformationCollection.Clear(); var studentLN = AllStudentInformation.Where(i => i.SLastName == SelectedLastName.StudentLastName).ToList(); NumberOfStudents = studentLN.Count(); foreach (var info in studentLN) { StudentInformationCollection.Add(info); } } }