public UnitController() { Unit = DbAdapter.LoadAllUnit(); ViewableUnit = new ObservableCollection <Unit>(Unit); //this list we will modify later //Part of step 2.3.2 from Week 9 tutorial foreach (Unit e in Unit) { e.ClassList = DbAdapter.LoadClasses(e.Code); } }
public StaffController() { StaffMasterList = DbAdapter.LoadAllStaff(); ViewableStaff = new ObservableCollection <Staff>(StaffMasterList); foreach (Staff e in StaffMasterList) { e.WorkTime = DbAdapter.LoadConsultationItems(e.ID); e.Class = DbAdapter.LoadStaffClasses(e.ID); } }