/// <summary>
        /// 取得科目成績Log UDT 的物件清單
        /// </summary>
        private Dictionary <string, List <SubjectObj> > GetkcbsDic(List <string> StudentIDList)
        {
            Dictionary <string, List <SubjectObj> > dic = new Dictionary <string, List <SubjectObj> >();
            string    studentIDL = string.Join("','", StudentIDList);
            DataTable dt         = tool._Q.Select(string.Format("select * from $kcbs.subjectscorelog where ref_student_id in ('{0}') and school_year='{1}' and semester='{2}'", studentIDL, _SchoolYear, _Semester));

            foreach (DataRow each in dt.Rows)
            {
                //資料轉換
                ScoreRow sRow = new ScoreRow(each);

                //每一個科目
                SubjectObj s = new SubjectObj(sRow);

                if (!dic.ContainsKey(sRow.ref_student_id))
                {
                    dic.Add(sRow.ref_student_id, new List <SubjectObj>());
                }

                dic[sRow.ref_student_id].Add(s);
            }

            return(dic);
        }
Beispiel #2
0
 public SubjectObj(ScoreRow sRow)
 {
     kcbs_sore = sRow;
 }