Пример #1
0
        private void CheckYearAndSemester(SubjectScoreObj obj)
        {
            //若學生缺少該學年度學期的歷程,則自動建立
            string key = obj.StudentId + "_" + _schoolYear + "_" + _semester;

            if (!_Student_schoolyear_sems.Contains(key) && obj.GradeYear != 0)
            {
                _Student_schoolyear_sems.Add(key);
                SemesterHistoryItem item = new SemesterHistoryItem();
                item.SchoolYear = _schoolYear;
                item.Semester   = _semester;
                item.GradeYear  = obj.GradeYear;
                item.SeatNo     = obj.SeatNo;
                item.ClassName  = obj.ClassName;
                item.Teacher    = obj.TeacherName;
                _Update_sems_history[obj.StudentId].SemesterHistoryItems.Add(item);
            }
        }
Пример #2
0
        private void SetScore(SubjectScore ss, decimal score, SubjectScoreObj obj)
        {
            ss.Score  = score;
            ss.Period = obj.Period;
            ss.Credit = obj.Credit;
            ss.Domain = obj.SubjectGroup;

            if (obj.SubjectTypeEnum == Tool.SubjectType.Honor)
            {
                ss.GPA = Tool.GPA.Eval(score).Honors;
            }
            else
            {
                ss.GPA = Tool.GPA.Eval(score).Regular;
            }

            ss.Level = obj.CourseGradeYear;
            ss.Type  = obj.SubjectType;
        }