コード例 #1
0
        public StudentScore(JHStudentRecord student)
        {
            AttendScore    = new AttendScoreCollection();
            SemestersScore = new SemesterScoreCollection();
            GraduateScore  = new GraduateScoreCollection();
            SHistory       = new SemesterDataCollection();

            Id                   = student.ID;
            Name                 = student.Name;
            RefClassID           = student.RefClassID;
            SeatNo               = student.SeatNo + "";
            StudentNumber        = student.StudentNumber;
            RefCalculationRuleID = student.OverrideScoreCalcRuleID + "";
        }
コード例 #2
0
        /// <summary>
        /// 取得按年級學期排序、去除重讀學期後指定的學期資訊,例:1,2,3,4,取得1,2年級的資訊,例:1,2,3,4,5,取得1,2年級與3上的資訊。
        /// </summary>
        /// <param name="semester"></param>
        /// <returns></returns>
        public SemesterDataCollection GetSemesters(List <int> semesters)
        {
            SemesterDataCollection origin = GetGradeYearSemester();
            SemesterDataCollection result = new SemesterDataCollection();

            foreach (SemesterData semester in origin)
            {
                if (semester.GradeYear == 1 && semester.Semester == 1)
                {
                    if (semesters.Contains(1))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 1 && semester.Semester == 2)
                {
                    if (semesters.Contains(2))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 2 && semester.Semester == 1)
                {
                    if (semesters.Contains(3))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 2 && semester.Semester == 2)
                {
                    if (semesters.Contains(4))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 3 && semester.Semester == 1)
                {
                    if (semesters.Contains(5))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 3 && semester.Semester == 2)
                {
                    if (semesters.Contains(6))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 7 && semester.Semester == 1)
                {
                    if (semesters.Contains(1))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 7 && semester.Semester == 2)
                {
                    if (semesters.Contains(2))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 8 && semester.Semester == 1)
                {
                    if (semesters.Contains(3))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 8 && semester.Semester == 2)
                {
                    if (semesters.Contains(4))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 9 && semester.Semester == 1)
                {
                    if (semesters.Contains(5))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 9 && semester.Semester == 2)
                {
                    if (semesters.Contains(6))
                    {
                        result.Add(semester);
                    }
                }
            }

            return(result);
        }
コード例 #3
0
        /// <summary>
        /// 取得按年級學期排序、去除重讀學期後指定的學期資訊,例:1,2,3,4,取得1,2年級的資訊,例:1,2,3,4,5,取得1,2年級與3上的資訊。
        /// </summary>
        /// <param name="semester"></param>
        /// <returns></returns>
        public SemesterDataCollection GetSemesters(List <int> semesters)
        {
            SemesterDataCollection origin = GetGradeYearSemester();
            SemesterDataCollection result = new SemesterDataCollection();

            foreach (SemesterData semester in origin)
            {
                if (semester.GradeYear == 1 && semester.Semester == 1)
                {
                    if (semesters.Contains(1))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 1 && semester.Semester == 2)
                {
                    if (semesters.Contains(2))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 2 && semester.Semester == 1)
                {
                    if (semesters.Contains(3))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 2 && semester.Semester == 2)
                {
                    if (semesters.Contains(4))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 3 && semester.Semester == 1)
                {
                    if (semesters.Contains(5))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 3 && semester.Semester == 2)
                {
                    if (semesters.Contains(6))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 4 && semester.Semester == 1)
                {
                    if (semesters.Contains(7))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 4 && semester.Semester == 2)
                {
                    if (semesters.Contains(8))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 5 && semester.Semester == 1)
                {
                    if (semesters.Contains(9))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 5 && semester.Semester == 2)
                {
                    if (semesters.Contains(10))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 6 && semester.Semester == 1)
                {
                    if (semesters.Contains(11))
                    {
                        result.Add(semester);
                    }
                }
                else if (semester.GradeYear == 6 && semester.Semester == 2)
                {
                    if (semesters.Contains(12))
                    {
                        result.Add(semester);
                    }
                }

                //2017/12/11 穎驊註解,因應康橋新竹國小需要支援六年制,調整了以上判讀學生年級、學期的邏輯,
                //並將原本 判斷七年級 == 一年級、八年級 == 二年級、九年級 == 三年級的邏輯註解掉。

                //else if (semester.GradeYear == 7 && semester.Semester == 1)
                //{
                //    if (semesters.Contains(1))
                //        result.Add(semester);
                //}
                //else if (semester.GradeYear == 7 && semester.Semester == 2)
                //{
                //    if (semesters.Contains(2))
                //        result.Add(semester);
                //}
                //else if (semester.GradeYear == 8 && semester.Semester == 1)
                //{
                //    if (semesters.Contains(3))
                //        result.Add(semester);
                //}
                //else if (semester.GradeYear == 8 && semester.Semester == 2)
                //{
                //    if (semesters.Contains(4))
                //        result.Add(semester);
                //}
                //else if (semester.GradeYear == 9 && semester.Semester == 1)
                //{
                //    if (semesters.Contains(5))
                //        result.Add(semester);
                //}
                //else if (semester.GradeYear == 9 && semester.Semester == 2)
                //{
                //    if (semesters.Contains(6))
                //        result.Add(semester);
                //}
            }

            return(result);
        }