예제 #1
0
        public StaffController()
        {
            //set up the main list, that wont be changed
            StaffListMain = DbAdaptor.LoadStaffList();

            //active working variable that is always changed as needed to display different information to the user
            viewableStaff = new ObservableCollection <Staff>(StaffListMain);
        }
예제 #2
0
        public Unit LoadClassDetails(Unit u)
        {
            SelectedUnitMain = u;

            SelectedUnitMain.UnitDetails = DbAdaptor.LoadUnitDetails(u.Code);
            viewableClasses = new ObservableCollection <Class>(SelectedUnitMain.UnitDetails);

            return(SelectedUnitMain);
        }
예제 #3
0
        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);
        }
예제 #4
0
 public UnitController()
 {
     UnitListMain  = DbAdaptor.LoadUnitList();
     viewableUnits = new ObservableCollection <Unit>(UnitListMain);
 }