/// <summary>
        /// 將值填入Row的方法
        /// </summary>
        public void SetValue(SuperObj obj, int SchoolYear, int Semester)
        {
            DemeritDetailClearedButSummaryNotClearedRATRecord ddcbsnc = new DemeritDetailClearedButSummaryNotClearedRATRecord();

            ddcbsnc.自動統計鍵值  = obj.StudentRecord.ID + "," + SchoolYear + "," + Semester;
            ddcbsnc.學生系統編號  = obj.StudentRecord.ID;
            ddcbsnc.學年度     = SchoolYear;
            ddcbsnc.學期      = Semester;
            ddcbsnc.姓名      = obj.StudentRecord.Name;
            ddcbsnc.身分證號    = obj.StudentRecord.IDNumber;
            ddcbsnc.班級      = obj.StudentRecord.Class != null ? obj.StudentRecord.Class.Name : "";
            ddcbsnc.座號      = obj.StudentRecord.SeatNo.HasValue ? obj.StudentRecord.SeatNo.Value.ToString() : "";
            ddcbsnc.狀態      = obj.StudentRecord.StatusStr;
            ddcbsnc.學號      = obj.StudentRecord.StudentNumber;
            ddcbsnc.明細大過數   = obj.DetailA;
            ddcbsnc.明細小過數   = obj.DetailB;
            ddcbsnc.明細警告數   = obj.DetailC;
            ddcbsnc.銷過明細大過數 = obj.DefAuto.ClearedDemeritA;
            ddcbsnc.銷過明細小過數 = obj.DefAuto.ClearedDemeritB;
            ddcbsnc.銷過明細警告數 = obj.DefAuto.ClearedDemeritC;
            ddcbsnc.非明細大過數  = obj.DefAuto.InitialDemeritA;
            ddcbsnc.非明細小過數  = obj.DefAuto.InitialDemeritB;
            ddcbsnc.非明細警告數  = obj.DefAuto.InitialDemeritC;
            ddcbsnc.自動統計大過數 = obj.DefAuto.DemeritA;
            ddcbsnc.自動統計小過數 = obj.DefAuto.DemeritB;
            ddcbsnc.自動統計警告數 = obj.DefAuto.DemeritC;
            RATRecords.Add(ddcbsnc);
        }
        private MoralScoreRecord setInitialSummary(StringBuilder sb, string SchoolYear, string Semester, SuperObj obj)
        {
            foreach (AutoSummaryRecord auto in obj.AutoSummaryDic)
            {
                if (auto.SchoolYear == int.Parse(SchoolYear) && auto.Semester == int.Parse(Semester))
                {
                    XmlHelper helper = new XmlHelper(auto.InitialSummary);
                    //取得資料並且轉換
                    int A = K12.Data.Int.Parse(helper.GetElement("DisciplineStatistics/Demerit").GetAttribute("A"));
                    int B = K12.Data.Int.Parse(helper.GetElement("DisciplineStatistics/Demerit").GetAttribute("B"));
                    int C = K12.Data.Int.Parse(helper.GetElement("DisciplineStatistics/Demerit").GetAttribute("C"));
                    sb.AppendLine("「非明細懲戒統計」目前內容為:");
                    sb.AppendLine("大過:「" + A + "」小過「" + B + "」警告「" + C + "」");

                    //減去銷過數量
                    A -= auto.ClearedDemeritA;
                    B -= auto.ClearedDemeritB;
                    C -= auto.ClearedDemeritC;

                    sb.AppendLine("修正後「非明細懲戒統計」為:");
                    sb.AppendLine("大過:「" + A + "」小過「" + B + "」警告「" + C + "」");
                    sb.AppendLine("");
                    //設定回xml資料內
                    helper.GetElement("DisciplineStatistics/Demerit").SetAttribute("A", A.ToString());
                    helper.GetElement("DisciplineStatistics/Demerit").SetAttribute("B", B.ToString());
                    helper.GetElement("DisciplineStatistics/Demerit").SetAttribute("C", C.ToString());
                    //更新資料需由MoralScore進行更新
                    return(auto.MoralScore);
                }
            }
            return(null);
        }