/// <summary> /// 构造函数。 /// </summary> public TeaSyncData() { this.time = DateTime.Now; this.school = new School(); }
/// <summary> /// 下载教师同步数据。 /// </summary> /// <param name="schoolID"></param> /// <param name="teacherID"></param> /// <returns></returns> public TeaSyncData DownloadTeaSyncData(GUIDEx schoolID, GUIDEx teacherID) { if (!schoolID.IsValid || !teacherID.IsValid) { return null; } TeaSyncData result = null; School scInfo = new School(); #region 学校信息。 if (this.schoolsEntity.LoadTeaSyncSchool(ref scInfo, schoolID)) { result = new TeaSyncData(); result.School = scInfo; } #endregion Teacher teaInfo = new Teacher(); #region 教师信息。 if (this.teachersEntity.LoadTeaSyncTeacher(ref teaInfo, teacherID)) { scInfo.Teacher = teaInfo; } #endregion #region 年级。 Grades grades = this.gradeEntity.LoadTeaSyncGrades(schoolID, teaInfo.TeacherID); if (grades != null && grades.Count > 0) { for (int i = 0; i < grades.Count; i++) { //目录,要点。 this.catalogEntity.LoadTeaSyncCatalogKnowledgePoints(grades[i], schoolID); //客观评价方式。 this.evaluateEntity.LoadTeaSyncEvaluate(grades[i]); //班级,学生。 this.classEntity.LoadTeaSyncClassStudents(grades[i], teaInfo.TeacherID); } teaInfo.Grades = grades; } #endregion return result; }