//2018/2/5 穎驊新增 提供使用者 可以自行調整 異動名冊封面的資料 public RetaintoStudentListModifyingCoverForm(StudUpdateRecBatchRec BRec) { InitializeComponent(); _BRec = BRec; if (_BRec == null) { return; } System.Xml.XmlElement source; source = (XmlElement)BRec.Content.SelectSingleNode("異動名冊"); //填資料 #region 填資料 string school_code = source.SelectSingleNode("@學校代號").InnerText; string school_year = source.SelectSingleNode("@學年度").InnerText; string school_semester = source.SelectSingleNode("@學期").InnerText; foreach (XmlNode list in source.SelectNodes("清單")) { List <string> row_data = new List <string>(); string gradeYear = list.SelectSingleNode("@年級").InnerText; string deptCode = list.SelectSingleNode("@科別代碼").InnerText; foreach (XmlElement st in list.SelectNodes("異動名冊封面")) { //string reportType = st.SelectSingleNode("@名冊別").InnerText; string reportType = "a";// 新生保留錄取資格名冊封面 固定為a string classType = st.SelectSingleNode("@班別") != null?st.SelectSingleNode("@班別").InnerText : ""; string updateType = st.SelectSingleNode("@上傳類別") != null?st.SelectSingleNode("@上傳類別").InnerText : ""; string LongTermCareStudentCount = st.SelectSingleNode("@因病須長期療養或懷孕申請保留學生數") != null?st.SelectSingleNode("@因病須長期療養或懷孕申請保留學生數").InnerText : ""; string MilitaryStudentCount = st.SelectSingleNode("@因服兵役申請保留學生數") != null?st.SelectSingleNode("@因服兵役申請保留學生數").InnerText : ""; string ReCallStudentCount = st.SelectSingleNode("@因病申請保留錄取資格期間復受徵召服役者申請學生數") != null?st.SelectSingleNode("@因病申請保留錄取資格期間復受徵召服役者申請學生數").InnerText : ""; string remarksContent = st.SelectSingleNode("@備註說明") != null?st.SelectSingleNode("@備註說明").InnerText : ""; //學校代號 row_data.Add(school_code); //學年度 row_data.Add(school_year); //學期 row_data.Add(school_semester); //年級 row_data.Add(gradeYear); //名冊別 row_data.Add(reportType); //班別 row_data.Add(classType); //科別代碼 row_data.Add(deptCode); //上傳類別 row_data.Add(updateType); //因病須長期療養或懷孕申請保留學生數 row_data.Add(LongTermCareStudentCount); //因服兵役申請保留學生數 row_data.Add(MilitaryStudentCount); //因病申請保留錄取資格期間復受徵召服役者申請學生數 row_data.Add(ReCallStudentCount); //備註說明 row_data.Add(remarksContent); // 轉成array 加入 datagridview string[] row_data_array = row_data.ToArray(); dataGridViewX1.Rows.Add(row_data_array); } } #endregion }
//2018/2/5 穎驊新增 提供使用者 可以自行調整 異動名冊封面的資料 public GraduatingStudentListModifyingCoverForm(StudUpdateRecBatchRec BRec) { InitializeComponent(); _BRec = BRec; if (_BRec == null) { return; } System.Xml.XmlElement source; source = (XmlElement)BRec.Content.SelectSingleNode("異動名冊"); //填資料 #region 填資料 string school_code = source.SelectSingleNode("@學校代號").InnerText; string school_year = source.SelectSingleNode("@學年度").InnerText; string school_semester = source.SelectSingleNode("@學期").InnerText; foreach (XmlNode list in source.SelectNodes("清單")) { List <string> row_data = new List <string>(); string gradeYear = list.SelectSingleNode("@年級").InnerText; string deptCode = list.SelectSingleNode("@科別代碼").InnerText; foreach (XmlElement st in list.SelectNodes("異動名冊封面")) { //string reportType = st.SelectSingleNode("@名冊別").InnerText; string reportType = "4";// 畢業名冊 固定為4 string classType = st.SelectSingleNode("@班別") != null?st.SelectSingleNode("@班別").InnerText : ""; string updateType = st.SelectSingleNode("@上傳類別") != null?st.SelectSingleNode("@上傳類別").InnerText : ""; string approvedClassCount = st.SelectSingleNode("@核定班數") != null?st.SelectSingleNode("@核定班數").InnerText : ""; string approvedStudentCount = st.SelectSingleNode("@核定學生數") != null?st.SelectSingleNode("@核定學生數").InnerText : ""; string actualClassCount = st.SelectSingleNode("@實招班數") != null?st.SelectSingleNode("@實招班數").InnerText : ""; string actualStudentCount = st.SelectSingleNode("@實招新生數") != null?st.SelectSingleNode("@實招新生數").InnerText : ""; string originalStudentCount = st.SelectSingleNode("@原有學生數") != null?st.SelectSingleNode("@原有學生數").InnerText : ""; string graduatingStudentCount = st.SelectSingleNode("@畢業學生數") != null?st.SelectSingleNode("@畢業學生數").InnerText : ""; string remarksContent = st.SelectSingleNode("@備註說明") != null?st.SelectSingleNode("@備註說明").InnerText : ""; //學校代號 row_data.Add(school_code); //學年度 row_data.Add(school_year); //學期 row_data.Add(school_semester); //年級 row_data.Add(gradeYear); //名冊別 row_data.Add(reportType); //班別 row_data.Add(classType); //科別代碼 row_data.Add(deptCode); //上傳類別 row_data.Add(updateType); //核定班數 row_data.Add(approvedClassCount); //核定學生數 row_data.Add(approvedStudentCount); //實招班數 row_data.Add(actualClassCount); //實招新生數 row_data.Add(actualStudentCount); //原有學生數 row_data.Add(originalStudentCount); //畢業學生數 row_data.Add(graduatingStudentCount); //備註說明 row_data.Add(remarksContent); // 轉成array 加入 datagridview string[] row_data_array = row_data.ToArray(); dataGridViewX1.Rows.Add(row_data_array); } } #endregion }
//2018/2/5 穎驊新增 提供使用者 可以自行調整 異動名冊封面的資料 public ExtendingStudentUpdateRecordListCoverRecModifyingCoverForm(StudUpdateRecBatchRec BRec) { InitializeComponent(); _BRec = BRec; if (_BRec == null) { return; } System.Xml.XmlElement source; source = (XmlElement)BRec.Content.SelectSingleNode("異動名冊"); //填資料 #region 填資料 string school_code = source.SelectSingleNode("@學校代號").InnerText; string school_year = source.SelectSingleNode("@學年度").InnerText; string school_semester = source.SelectSingleNode("@學期").InnerText; foreach (XmlNode list in source.SelectNodes("清單")) { List <string> row_data = new List <string>(); string deptCode = list.SelectSingleNode("@科別代碼").InnerText; foreach (XmlElement st in list.SelectNodes("異動名冊封面")) { string reportType = st.SelectSingleNode("@名冊別").InnerText; string scheduledGraduateYear = st.SelectSingleNode("@應畢業學年度").InnerText; string classType = st.SelectSingleNode("@班別").InnerText; string updateType = st.SelectSingleNode("@上傳類別").InnerText; string approvedExtendingStudentCount = st.SelectSingleNode("@輔導延修學生數").InnerText; string originalStudentCount = st.SelectSingleNode("@原有學生數").InnerText; string decreaseStudentCount = st.SelectSingleNode("@減少學生數").InnerText; string modifiedStudentCount = st.SelectSingleNode("@更正學生數").InnerText; string currentStudentCount = st.SelectSingleNode("@現有學生數").InnerText; string remarksContent = st.SelectSingleNode("@備註說明").InnerText; //學校代號 row_data.Add(school_code); //學年度 row_data.Add(school_year); //學期 row_data.Add(school_semester); //名冊別 row_data.Add(reportType); //應畢業學年度 row_data.Add(scheduledGraduateYear); //班別 row_data.Add(school_semester); //科別代碼 row_data.Add(deptCode); //上傳類別 row_data.Add(updateType); //輔導延修學生數 row_data.Add(approvedExtendingStudentCount); //原有學生數 row_data.Add(originalStudentCount); //減少學生數 row_data.Add(decreaseStudentCount); //更正學生數 row_data.Add(modifiedStudentCount); //現有學生數 row_data.Add(currentStudentCount); //備註說明 row_data.Add(remarksContent); // 轉成array 加入 datagridview string[] row_data_array = row_data.ToArray(); dataGridViewX1.Rows.Add(row_data_array); } } #endregion }
//2018/2/5 穎驊新增 提供使用者 可以自行調整 異動名冊封面的資料 public TemporaryStudentListModifyingCoverForm(StudUpdateRecBatchRec BRec) { InitializeComponent(); _BRec = BRec; if (_BRec == null) { return; } System.Xml.XmlElement source; source = (XmlElement)BRec.Content.SelectSingleNode("異動名冊"); //填資料 #region 填資料 string school_code = source.SelectSingleNode("@學校代號").InnerText; string school_year = source.SelectSingleNode("@學年度").InnerText; string school_semester = source.SelectSingleNode("@學期").InnerText; foreach (XmlNode list in source.SelectNodes("清單")) { List <string> row_data = new List <string>(); string gradeYear = list.SelectSingleNode("@年級").InnerText; string deptCode = list.SelectSingleNode("@科別代碼").InnerText; foreach (XmlElement st in list.SelectNodes("異動名冊封面")) { //string reportType = st.SelectSingleNode("@名冊別").InnerText; string reportType = "a";// 新生保留錄取資格名冊封面 固定為a string classType = st.SelectSingleNode("@班別") != null?st.SelectSingleNode("@班別").InnerText : ""; string updateType = st.SelectSingleNode("@上傳類別") != null?st.SelectSingleNode("@上傳類別").InnerText : ""; string DisasterStudentCount = st.SelectSingleNode("@因災害申請借讀學生數") != null?st.SelectSingleNode("@因災害申請借讀學生數").InnerText : ""; string MaladapStudentCount = st.SelectSingleNode("@因適應不良申請借讀學生數") != null?st.SelectSingleNode("@因適應不良申請借讀學生數").InnerText : ""; string PlayerTrainingStudentCount = st.SelectSingleNode("@因參加國家代表隊選手培集訓申請借讀學生數") != null?st.SelectSingleNode("@因參加國家代表隊選手培集訓申請借讀學生數").InnerText : ""; string remarksContent = st.SelectSingleNode("@備註說明") != null?st.SelectSingleNode("@備註說明").InnerText : ""; //學校代號 row_data.Add(school_code); //學年度 row_data.Add(school_year); //學期 row_data.Add(school_semester); //年級 row_data.Add(gradeYear); //名冊別 row_data.Add(reportType); //班別 row_data.Add(classType); //科別代碼 row_data.Add(deptCode); //上傳類別 row_data.Add(updateType); //因災害申請借讀學生數 row_data.Add(DisasterStudentCount); //因適應不良申請借讀學生數 row_data.Add(MaladapStudentCount); //因參加國家代表隊選手培集訓申請借讀學生數 row_data.Add(PlayerTrainingStudentCount); //備註說明 row_data.Add(remarksContent); // 轉成array 加入 datagridview string[] row_data_array = row_data.ToArray(); dataGridViewX1.Rows.Add(row_data_array); } } #endregion }