/// <summary> /// filter a specifc Data where the given ID is true /// </summary> /// <param name="Id">The ID used to filter the data</param> /// <returns>filtered Datatable</returns> private DataTable GetDataTable(int Id) { string SelectedFilter = FilterByComboBox.SelectedItem.ToString(); switch (SelectedFilter) { case "Student": return(Data.GetByStudentID(Id)); case "Course": return(Data.GetByCourseID(Id)); case "Instructor": return(Data.GetByInstructorID(Id)); default: return(null); } }