public Unit LoadClassDetails(Unit u) { SelectedUnitMain = u; SelectedUnitMain.UnitDetails = DbAdaptor.LoadUnitDetails(u.Code); viewableClasses = new ObservableCollection <Class>(SelectedUnitMain.UnitDetails); return(SelectedUnitMain); }
public Staff LoadStaffDetails(Staff e) { e = DbAdaptor.LoadStaffDetails(e.Id); e.Consult = DbAdaptor.LoadConsultationDetails(e.Id); e.Teaching = DbAdaptor.LoadTeachingDetails(e.Id); foreach (Unit u in e.Teaching) { u.UnitDetails = DbAdaptor.LoadUnitDetails(u.Code); } return(e); }