/// <summary>
        /// 依據各別的DataTable建立UDT資料
        /// (By 缺曠資料)
        /// </summary>
        public static void Attendance_ExtendMethod(this GetUDTXml xml, string Element)
        {
            foreach (DataRow dr in xml.dataTable.Rows)
            {
                //先判斷是否為Dic內存之資料
                if (xml.XmlUDTDic.ContainsKey("" + dr[1]))
                {
                    string      student = "" + dr[1];
                    DSXmlHelper XmlDoc  = xml.XmlUDTDic[student]._XmlHelper;

                    #region Element

                    XmlDoc.AddElement(Element);
                    XmlDoc.SetAttribute(Element, "ID", "" + dr[0]);

                    XmlDoc.AddElement(Element, "RefStudentID");
                    XmlDoc.SetText(Element + "/RefStudentID", "" + dr[1]);

                    XmlDoc.AddElement(Element, "SchoolYear");
                    XmlDoc.SetText(Element + "/SchoolYear", "" + dr[2]);

                    XmlDoc.AddElement(Element, "Semester");
                    XmlDoc.SetText(Element + "/Semester", "" + dr[3]);

                    XmlDoc.AddElement(Element, "OccurDate");
                    XmlDoc.SetText(Element + "/OccurDate", UDT_S.ChangeTime("" + dr[4]));
                    //XML
                    XmlDoc.AddElement(Element, "Detail");
                    XmlDoc.AddXmlString(Element + "/Detail", "" + dr[5]);

                    #endregion

                    #region AttendanceRecord - 原生結構

                    //<Attendance ID="351287">
                    //    <RefStudentID>53972</RefStudentID>
                    //    <SchoolYear>99</SchoolYear>
                    //    <Semester>2</Semester>
                    //    <OccurDate>2011-01-20 00:00:00</OccurDate>
                    //    <Detail>
                    //        <Attendance>
                    //            <Period AbsenceType="公假">一</Period>
                    //            <Period AbsenceType="公假">二</Period>
                    //            <Period AbsenceType="公假">三</Period>
                    //            <Period AbsenceType="公假">四</Period>
                    //            <Period AbsenceType="公假">午休</Period>
                    //            <Period AbsenceType="公假">五</Period>
                    //        </Attendance>
                    //    </Detail>
                    //</Attendance>

                    #endregion
                }
            }
        }
Esempio n. 2
0
        /// <summary>
        /// 依據各別的DataTable建立UDT資料
        /// (By 德行表現成績)
        /// </summary>
        public static void SemsMoralScore_ExtendMethod(this GetUDTXml xml, string Element)
        {
            foreach (DataRow dr in xml.dataTable.Rows)
            {
                //先判斷是否為Dic內存之資料
                if (xml.XmlUDTDic.ContainsKey("" + dr[1]))
                {
                    string      student = "" + dr[1];
                    DSXmlHelper XmlDoc  = xml.XmlUDTDic[student]._XmlHelper;

                    #region Element

                    XmlDoc.AddElement(Element);
                    XmlDoc.SetAttribute(Element, "ID", "" + dr[0]);

                    XmlDoc.AddElement(Element, "RefStudentID");
                    XmlDoc.SetText(Element + "/RefStudentID", "" + dr[1]);

                    XmlDoc.AddElement(Element, "SchoolYear");
                    XmlDoc.SetText(Element + "/SchoolYear", "" + dr[2]);

                    XmlDoc.AddElement(Element, "Semester");
                    XmlDoc.SetText(Element + "/Semester", "" + dr[3]);

                    XmlDoc.AddElement(Element, "Diff");
                    XmlDoc.SetText(Element + "/Diff", "" + dr[4]);

                    XmlDoc.AddElement(Element, "Comment");
                    XmlDoc.SetText(Element + "/Comment", "" + dr[5]);

                    XmlDoc.AddElement(Element, "Other_Diff");
                    XmlDoc.AddXmlString(Element + "/Other_Diff", "" + dr[6]);

                    XmlDoc.AddElement(Element, "Text_Score");
                    XmlDoc.AddXmlString(Element + "/Text_Score", "" + dr[7]);

                    XmlDoc.AddElement(Element, "Initial_Summary");
                    XmlDoc.AddXmlString(Element + "/Initial_Summary", "" + dr[8]);

                    XmlDoc.AddElement(Element, "Summary");
                    XmlDoc.AddXmlString(Element + "/Summary", "" + dr[9]);
                    #endregion

                    #region 原生結構


                    #endregion
                }
            }
        }
Esempio n. 3
0
        /// <summary>
        /// 依據各別的DataTable建立UDT資料
        /// (By 獎懲資料)
        /// </summary>
        public static void Discipline_ExtendMethod(this GetUDTXml xml, string Element)
        {
            foreach (DataRow dr in xml.dataTable.Rows)
            {
                //先判斷是否為Dic內存之資料
                if (xml.XmlUDTDic.ContainsKey("" + dr[8]))
                {
                    string      student = "" + dr[8];
                    DSXmlHelper XmlDoc  = xml.XmlUDTDic[student]._XmlHelper;

                    #region Element

                    XmlDoc.AddElement(Element);
                    XmlDoc.SetAttribute(Element, "ID", "" + dr[0]);

                    XmlDoc.AddElement(Element, "RefStudentID");
                    XmlDoc.SetText(Element + "/RefStudentID", "" + dr[8]);

                    XmlDoc.AddElement(Element, "SchoolYear");
                    XmlDoc.SetText(Element + "/SchoolYear", "" + dr[1]);

                    XmlDoc.AddElement(Element, "Semester");
                    XmlDoc.SetText(Element + "/Semester", "" + dr[2]);

                    XmlDoc.AddElement(Element, "OccurDate");
                    XmlDoc.SetText(Element + "/OccurDate", UDT_S.ChangeTime("" + dr[4]));

                    XmlDoc.AddElement(Element, "RegisterDate");
                    XmlDoc.SetText(Element + "/RegisterDate", UDT_S.ChangeTime("" + dr[12]));

                    //0懲戒,1獎勵,2留察
                    XmlDoc.AddElement(Element, "MeritFlag");
                    XmlDoc.SetText(Element + "/MeritFlag", "" + dr[10]);

                    XmlDoc.AddElement(Element, "Reason");
                    XmlDoc.SetText(Element + "/Reason", "" + dr[6]);
                    //XML
                    XmlDoc.AddElement(Element, "Detail");
                    XmlDoc.AddXmlString(Element + "/Detail", "" + dr[7]);

                    #endregion

                    #region DisciplineRecord - 原生Xml結構

                    //<Discipline ID="315122">
                    //    <RefStudentID>57097</RefStudentID>
                    //    <Name>王小彥</Name>
                    //    <StudentNumber>J00114</StudentNumber>
                    //    <SeatNo>1</SeatNo>
                    //    <ClassName>普一甲</ClassName>
                    //    <Gender>女</Gender>
                    //    <SchoolYear>100</SchoolYear>
                    //    <Semester>1</Semester>
                    //    <OccurDate>2011/07/09</OccurDate>
                    //    <GradeYear />
                    //    <Reason>群育:自動參加花燈創意比賽,熱心公務。</Reason>
                    //    <Type>1</Type>
                    //    <MeritFlag>1</MeritFlag>
                    //    <RegisterDate>2011/08/11</RegisterDate>
                    //    <Detail>
                    //        <Discipline>
                    //            <Merit A="0" B="0" C="1" />
                    //            <Demerit A="0" B="1" C="0" ClearDate="" ClearReason="" Cleared="" />
                    //        </Discipline>
                    //    </Detail>
                    //    </Discipline>

                    #endregion
                }
            }
        }
Esempio n. 4
0
        /// <summary>
        /// 依據各別的DataTable建立UDT資料
        /// (By 異動資料)
        /// </summary>
        public static void Update_ExtendMethod(this GetUDTXml xml, string Element)
        {
            foreach (DataRow dr in xml.dataTable.Rows)
            {
                //先判斷是否為Dic內存之資料
                if (xml.XmlUDTDic.ContainsKey("" + dr[1]))
                {
                    string      student = "" + dr[1];
                    DSXmlHelper XmlDoc  = xml.XmlUDTDic[student]._XmlHelper;

                    #region Element

                    XmlDoc.AddElement(Element);
                    XmlDoc.SetAttribute(Element, "ID", "" + dr[0]);

                    XmlDoc.AddElement(Element, "RefStudentID");
                    XmlDoc.SetText(Element + "/RefStudentID", "" + dr[1]);

                    XmlDoc.AddElement(Element, "SchoolYear");
                    XmlDoc.SetText(Element + "/SchoolYear", "" + dr[2]);

                    XmlDoc.AddElement(Element, "Semester");
                    XmlDoc.SetText(Element + "/Semester", "" + dr[3]);

                    XmlDoc.AddElement(Element, "S_Name");
                    XmlDoc.SetText(Element + "/S_Name", "" + dr[4]);

                    XmlDoc.AddElement(Element, "S_StudentNumber");
                    XmlDoc.SetText(Element + "/S_StudentNumber", "" + dr[5]);

                    XmlDoc.AddElement(Element, "S_Gender");
                    XmlDoc.SetText(Element + "/S_Gender", "" + dr[6]);

                    XmlDoc.AddElement(Element, "S_IDNumber");
                    XmlDoc.SetText(Element + "/S_IDNumber", "" + dr[7]);

                    XmlDoc.AddElement(Element, "S_Birthdate");
                    XmlDoc.SetText(Element + "/S_Birthdate", UDT_S.ChangeTime("" + dr[8]));

                    XmlDoc.AddElement(Element, "S_GradeYear");
                    XmlDoc.SetText(Element + "/S_GradeYear", "" + dr[9]);

                    XmlDoc.AddElement(Element, "S_Dept");
                    XmlDoc.SetText(Element + "/S_Dept", "" + dr[10]);

                    XmlDoc.AddElement(Element, "Update_Date");
                    XmlDoc.SetText(Element + "/Update_Date", UDT_S.ChangeTime("" + dr[11]));

                    XmlDoc.AddElement(Element, "Update_Code");
                    XmlDoc.SetText(Element + "/Update_Code", "" + dr[12]);

                    XmlDoc.AddElement(Element, "Update_Type");
                    XmlDoc.SetText(Element + "/Update_Type", "" + dr[13]);

                    XmlDoc.AddElement(Element, "Update_Reason");
                    XmlDoc.SetText(Element + "/Update_Reason", "" + dr[14]);

                    XmlDoc.AddElement(Element, "Update_Desc");
                    XmlDoc.SetText(Element + "/Update_Desc", "" + dr[15]);

                    XmlDoc.AddElement(Element, "AD_Date");
                    XmlDoc.SetText(Element + "/AD_Date", "" + dr[16]);

                    XmlDoc.AddElement(Element, "AD_Numbar");
                    XmlDoc.SetText(Element + "/AD_Numbar", "" + dr[17]);

                    XmlDoc.AddElement(Element, "Last_AD_Date");
                    XmlDoc.SetText(Element + "/Last_AD_Date", UDT_S.ChangeTime("" + dr[18]));

                    XmlDoc.AddElement(Element, "Last_AD_Numbar");
                    XmlDoc.SetText(Element + "/Last_AD_Numbar", "" + dr[19]);

                    XmlDoc.AddElement(Element, "Comment");
                    XmlDoc.SetText(Element + "/Comment", "" + dr[20]);
                    //XML
                    XmlDoc.AddElement(Element, "ConText_Info");
                    XmlDoc.AddXmlString(Element + "/ConText_Info", "" + dr[21]);

                    XmlDoc.AddElement(Element, "Last_Update_Date");
                    XmlDoc.SetText(Element + "/Last_Update_Date", UDT_S.ChangeTime("" + dr[22]));

                    #endregion

                    #region  UpdateRecord - 原生結構

                    //<UpdateRecord ID="100540" RefStudentID="54139">
                    //    <SchoolYear>99</SchoolYear>
                    //    <Semester>2</Semester>
                    //    <Name>呂小鍾</Name>
                    //    <StudentNumber>712043</StudentNumber>
                    //    <Gender>男</Gender>
                    //    <IDNumber>J12254139</IDNumber>
                    //    <Birthdate>1993/08/15</Birthdate>
                    //    <GradeYear>3</GradeYear>
                    //    <Department>汽車科</Department>
                    //    <UpdateDate>2011/06/23</UpdateDate>
                    //    <UpdateCode>001</UpdateCode>
                    //    <UpdateType />
                    //    <UpdateReason />
                    //    <UpdateDescription>持國民中學畢業證明書者(含國中補校)</UpdateDescription>
                    //    <ADDate>1753/01/01</ADDate>
                    //    <ADNumber>澔字第1111111號</ADNumber>
                    //    <LastADDate />
                    //    <LastADNumber />
                    //    <Comment />
                    //    <ContextInfo>
                    //        <ContextInfo>
                    //            <GraduateComment>
                    //            </GraduateComment>
                    //            <ClassType> 3</ClassType>
                    //            <SpecialStatus>
                    //            </SpecialStatus>
                    //            <GraduateSchool> 市立光華國中</GraduateSchool>
                    //            <GraduateSchoolYear> 99</GraduateSchoolYear>
                    //            <GraduateSchoolCode> 183503</GraduateSchoolCode>
                    //            <GraduateSchoolLocationCode> 18</GraduateSchoolLocationCode>
                    //        </ContextInfo>
                    //    </ContextInfo>
                    //</UpdateRecord>

                    #endregion
                }
            }
        }