/// <summary> /// 设置全校有效的组、有课的班级和有课的教师(GroupList、SquadList、TeacherList) /// </summary> private void SetDataList() { GroupList.Clear(); SquadList.Clear(); TeacherList.Clear(); foreach (EnClsLesson clsLsn in DataRule.Lsn.eachClsLesson()) { if (clsLsn.SharedTime > 0) { if (!SquadList.Contains(clsLsn.Squad)) { SquadList.Add(clsLsn.Squad); } if (clsLsn.Teacher != null && !TeacherList.Contains(clsLsn.Teacher)) { TeacherList.Add(clsLsn.Teacher); } } } GroupList.Add(AllMember); GroupList.Add(AllSquad); GroupList.Add(AllTeacher); foreach (EnSquad sqd in SquadList) { foreach (EnSquadGroup grp in DataRule.Sqd.GetGroups(sqd)) { if (!GroupList.Contains(grp)) { GroupList.Add(grp); } } } foreach (EnTeacher tch in TeacherList) { foreach (EnTeacherGroup grp in DataRule.Tch.GetGroups(tch)) { if (!GroupList.Contains(grp)) { GroupList.Add(grp); } } } }