public CourseListViewItem(JHSchool.CourseRecord course, KH.JHAEIncludeRecord aei, List <KH.JHSCETakeRecord> sceList) { _is_finish = true; TeacherRecord teacher = course.GetFirstTeacher(); //_total = course.GetAttends().Count; _total = SCAttend.GetCourseStudentCount(course.ID); Calculate(sceList); if (aei.UseScore) { _is_finish &= (_scoreCount == _total); } if (aei.UseEffort) { _is_finish &= (_effortCount == _total); } if (aei.UseText) { _is_finish &= (_textCount == _total); } this.Text = course.Name; this.SubItems.Add((teacher != null) ? teacher.Name : ""); this.SubItems.Add(aei.UseScore ? ScoreField : "").ForeColor = (_scoreCount == _total) ? Color.Black : Color.Red; this.SubItems.Add(aei.UseEffort ? EffortField : "").ForeColor = (_effortCount == _total) ? Color.Black : Color.Red; this.SubItems.Add(aei.UseText ? TextField : "").ForeColor = (_textCount == _total) ? Color.Black : Color.Red; }
internal CompareCourseRecordEventArgs(CourseRecord v1, CourseRecord v2) { Value1 = v1; Value2 = v2; }
/// <summary> /// 取得課程的簡短描述 /// </summary> /// <param name="course">課程</param> /// <returns>簡短描述</returns> public static string GetDescription(this CourseRecord course) { return(course.Name + "[" + course.SchoolYear + " " + course.Semester + "]"); }
/// <summary> /// 取得課程類別資料。 /// </summary> public static List <CourseTagRecord> GetTags(this CourseRecord record) { return(CourseTag.Instance[record.ID]); }