public void LoadData(List <grade> SearchedGrade) { listGrade.Clear(); foreach (grade g in SearchedGrade) { ListGrade.Add(g); } }
public void LoadData() { if (listGrade != null) { ListGrade.Clear(); } else { listGrade = new ObservableCollection <grade>(); } List <grade> grades = DataProvider.Ins.DB.grades.ToList(); foreach (grade g in grades) { ListGrade.Add(g); } }