/// <summary> /// 畢業異動 /// </summary> public UpdateRecordInfo04(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List <XElement> UpdateCodeElms, bool isInsert) { InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); cbxClass.DropDownWidth = 300; _UpdateRec = UpdateRec; _UpdateCodeElms = UpdateCodeElms; _prlp = prlp; _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); _faldn = new UpdateRecordModule_KHSH_D.Utility.FormAndLogDataManager(_prlp); _epUpdateCode = new ErrorProvider(); _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); if (isInsert) { //當畢業證書字號沒有值取得SHLeaveInfoRecord畢業證書字號 if (string.IsNullOrEmpty(_UpdateRec.GraduateCertificateNumber)) { SHLeaveInfoRecord lvr = SHLeaveInfo.SelectByStudentID(_UpdateRec.StudentID); _UpdateRec.GraduateCertificateNumber = lvr.DiplomaNumber; } if (string.IsNullOrEmpty(_UpdateRec.ExpectGraduateSchoolYear)) { SHLeaveInfoRecord shl = SHLeaveInfo.SelectByStudentID(_UpdateRec.StudentID); if (shl.SchoolYear.HasValue) { _UpdateRec.ExpectGraduateSchoolYear = shl.SchoolYear.Value.ToString(); } } } // 載入資料 cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "異動代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); dtLastUpdateDate = _faldn.SetFormData(_UpdateRec.LastADDate, dtLastUpdateDate, "備查日期"); txtLastDocNo = _faldn.SetFormData(_UpdateRec.LastADNumber, txtLastDocNo, "備查文號"); txtLastUpdateCode = _faldn.SetFormData(_UpdateRec.LastUpdateCode, txtLastUpdateCode, "最後異動代號"); txtGradeDocNo = _faldn.SetFormData(_UpdateRec.GraduateCertificateNumber, txtGradeDocNo, "畢業證書字號"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); txtSHSchoolYear = _faldn.SetFormData(_UpdateRec.ExpectGraduateSchoolYear, txtSHSchoolYear, "應畢業學年度"); }
/// <summary> /// 畢業異動 /// </summary> public UpdateRecordInfo04(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List<XElement> UpdateCodeElms) { InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); _UpdateRec = UpdateRec; _UpdateCodeElms = UpdateCodeElms; _prlp = prlp; _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); _faldn = new UpdateRecordModule_SH_D.Utility.FormAndLogDataManager(_prlp); _epUpdateCode = new ErrorProvider(); _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); //當畢業證書字號沒有值取得SHLeaveInfoRecord畢業證書字號 if (string.IsNullOrEmpty(_UpdateRec.GraduateCertificateNumber)) { SHLeaveInfoRecord lvr = SHLeaveInfo.SelectByStudentID(_UpdateRec.StudentID); _UpdateRec.GraduateCertificateNumber = lvr.DiplomaNumber; } if (string.IsNullOrEmpty(_UpdateRec.ExpectGraduateSchoolYear)) { SHLeaveInfoRecord shl = SHLeaveInfo.SelectByStudentID(_UpdateRec.StudentID); if(shl.SchoolYear.HasValue) _UpdateRec.ExpectGraduateSchoolYear = shl.SchoolYear.Value.ToString(); } // 載入資料 cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "異動代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); dtLastUpdateDate = _faldn.SetFormData(_UpdateRec.LastADDate, dtLastUpdateDate, "備查日期"); txtLastDocNo = _faldn.SetFormData(_UpdateRec.LastADNumber, txtLastDocNo, "備查文號"); txtLastUpdateCode = _faldn.SetFormData(_UpdateRec.LastUpdateCode, txtLastUpdateCode, "最後異動代號"); txtGradeDocNo = _faldn.SetFormData(_UpdateRec.GraduateCertificateNumber, txtGradeDocNo, "畢業證書字號"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); txtSHSchoolYear = _faldn.SetFormData(_UpdateRec.ExpectGraduateSchoolYear, txtSHSchoolYear, "應畢業學年度"); }
/// <summary> /// 他校轉入 /// </summary> public UpdateRecordInfo02(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List <XElement> UpdateCodeElms) { InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); cbxClass.DropDownWidth = 300; _UpdateRec = UpdateRec; _UpdateCodeElms = UpdateCodeElms; _prlp = prlp; _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); _faldn = new UpdateRecordModule_SH_D.Utility.FormAndLogDataManager(_prlp); _epUpdateCode = new ErrorProvider(); // 建異動索引 _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); // 載入資料 cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "異動代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); txtSSchool = _faldn.SetFormData(_UpdateRec.PreviousSchool, txtSSchool, "原就讀學校"); txtSStudentNumber = _faldn.SetFormData(_UpdateRec.PreviousStudentNumber, txtSStudentNumber, "原就讀學號"); txtSDept = _faldn.SetFormData(_UpdateRec.PreviousDepartment, txtSDept, "原就讀科別"); txtSGradYear = _faldn.SetFormData(_UpdateRec.PreviousGradeYear, txtSGradYear, "原就讀年級"); dtSLastUpdateDate = _faldn.SetFormData(_UpdateRec.PreviousSchoolLastADDate, dtSLastUpdateDate, "原就讀備查日期"); txtSLastDocNo = _faldn.SetFormData(_UpdateRec.PreviousSchoolLastADNumber, txtSLastDocNo, "原就讀備查文號"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); txtSSemester = _faldn.SetFormData(_UpdateRec.PreviousSemester, txtSSemester, "原就讀學期"); txtComment2 = _faldn.SetFormData(_UpdateRec.Comment2, txtComment2, "轉入身分別代碼"); }
/// <summary> /// 他校轉入 /// </summary> public UpdateRecordInfo02(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List<XElement> UpdateCodeElms) { InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); _UpdateRec = UpdateRec; _UpdateCodeElms = UpdateCodeElms; _prlp = prlp; _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); _faldn = new UpdateRecordModule_SH_D.Utility.FormAndLogDataManager(_prlp); _epUpdateCode = new ErrorProvider(); // 建異動索引 _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); // 載入資料 cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "異動代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); txtSSchool = _faldn.SetFormData(_UpdateRec.PreviousSchool,txtSSchool, "原就讀學校"); txtSStudentNumber = _faldn.SetFormData(_UpdateRec.PreviousStudentNumber, txtSStudentNumber, "原就讀學號"); txtSDept = _faldn.SetFormData(_UpdateRec.PreviousDepartment, txtSDept, "原就讀科別"); txtSGradYear = _faldn.SetFormData(_UpdateRec.PreviousGradeYear, txtSGradYear, "原就讀年級"); dtSLastUpdateDate = _faldn.SetFormData(_UpdateRec.PreviousSchoolLastADDate, dtSLastUpdateDate, "原就讀備查日期"); txtSLastDocNo = _faldn.SetFormData(_UpdateRec.PreviousSchoolLastADNumber, txtSLastDocNo, "原就讀備查文號"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); txtSSemester = _faldn.SetFormData(_UpdateRec.PreviousSemester, txtSSemester, "原就讀學期"); txtComment2 = _faldn.SetFormData(_UpdateRec.Comment2, txtComment2, "轉入身分別代碼"); }
/// <summary> /// 新生異動 /// </summary> public UpdateRecordInfo03(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List<XElement> UpdateCodeElms) { InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); _UpdateRec = UpdateRec; _prlp = prlp; _UpdateCodeElms = UpdateCodeElms; _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); _epUpdateCode = new ErrorProvider(); _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); _faldn = new UpdateRecordModule_SH_D.Utility.FormAndLogDataManager(_prlp); // 載入資料 // 載入預設前級畢業資訊 Dictionary<string, DAL.SchoolData> schoolDataDict = new Dictionary<string, DAL.SchoolData>(); foreach (XElement elm in BL.Get.JHSchoolList().Elements("學校")) { DAL.SchoolData sd = new DAL.SchoolData(); sd.SchoolCode = elm.Attribute("代碼").Value; sd.SchoolLocation = elm.Attribute("所在地").Value; sd.SchoolName = elm.Attribute("名稱").Value; sd.SchoolLocationCode = elm.Attribute("所在地代碼").Value; if (sd.SchoolCode.Length > 3) sd.SchoolType = sd.SchoolCode.Substring(2, 1); string s1 = elm.Attribute("所在地").Value + elm.Attribute("名稱").Value; if (!schoolDataDict.ContainsKey(s1)) schoolDataDict.Add(s1, sd); if (!schoolDataDict.ContainsKey(sd.SchoolName)) schoolDataDict.Add(sd.SchoolName, sd); } SHBeforeEnrollmentRecord brfRec = SHBeforeEnrollment.SelectByStudentID(_UpdateRec.StudentID); if (string.IsNullOrEmpty(_UpdateRec.GraduateSchool)) _UpdateRec.GraduateSchool = brfRec.School; if (string.IsNullOrEmpty(_UpdateRec.GraduateSchoolYear)) _UpdateRec.GraduateSchoolYear = brfRec.GraduateSchoolYear; // 用學校名稱解析 if (!string.IsNullOrEmpty(brfRec.School)) { string key = brfRec.SchoolLocation.Replace("台", "臺") + brfRec.School.Trim(); if (schoolDataDict.ContainsKey(key)) { if (string.IsNullOrEmpty(_UpdateRec.GraduateSchoolCode)) { _UpdateRec.GraduateSchoolCode = schoolDataDict[key].SchoolCode; _UpdateRec.GraduateSchoolLocationCode = schoolDataDict[key].SchoolLocationCode; } } } cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "資格代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); txtISchool = _faldn.SetFormData(_UpdateRec.GraduateSchool, txtISchool, "入學資格(畢業國中)"); txtISpaceCode = _faldn.SetFormData(_UpdateRec.GraduateSchoolLocationCode,txtISpaceCode,"所在地代碼"); txtISchoolCode = _faldn.SetFormData(_UpdateRec.GraduateSchoolCode, txtISchoolCode, "畢業國中學校代號"); txtIJHGradeYear = _faldn.SetFormData(_UpdateRec.GraduateSchoolYear, txtIJHGradeYear, "國中畢業年度"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); txtGradeDoc = _faldn.SetFormData(_UpdateRec.GraduateDocument, txtGradeDoc, "入學資格證明文件"); }
/// <summary> /// 學籍異動 /// </summary> public UpdateRecordInfo01_N(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List <XElement> UpdateCodeElms) { InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); _UpdateRec = UpdateRec; _prlp = prlp; _UpdateCodeElms = UpdateCodeElms; _epUpdateCode = new ErrorProvider(); _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); // 更正學籍顯示對照用 _updateCodeDict4 = new Dictionary <string, string>(); // 進校 _updateCodeDict4.Add("301", "新學號"); _updateCodeDict4.Add("302", "新姓名"); _updateCodeDict4.Add("303", "新性別"); _updateCodeDict4.Add("304", "新身分證號"); _updateCodeDict4.Add("305", "新生日"); //// 讀取畢業學年度 //SHLeaveInfoRecord shl = SHLeaveInfo.SelectByStudentID(_UpdateRec.StudentID); //if (shl.SchoolYear.HasValue) // txtSHSchoolYear.Text = shl.SchoolYear.Value.ToString(); //// 當延修生要顯示 // if (_UpdateRec.GradeYear == "延修生") // { // txtSHSchoolYear.Enabled = true; // } // else // txtSHSchoolYear.Enabled = false; _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); _faldn = new UpdateRecordModule_SH_N.Utility.FormAndLogDataManager(_prlp); if (!string.IsNullOrEmpty(_UpdateRec.NewStudentNumber)) { int i; if (int.TryParse(_UpdateRec.NewStudentNumber.Trim(), out i)) { _UpdateRec.NewData = i.ToString(); _UpdateRec.NewStudentNumber = i.ToString(); } else { _UpdateRec.NewStudentNumber = ""; } } // 載入資料 cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "異動代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtSHSchoolYear = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSHSchoolYear, "特殊身分代碼"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); txtNewData = _faldn.SetFormData(_UpdateRec.NewData, txtNewData, "新資料"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); dtLastUpdateDate = _faldn.SetFormData(_UpdateRec.LastADDate, dtLastUpdateDate, "備查日期"); txtLastDocNo = _faldn.SetFormData(_UpdateRec.LastADNumber, txtLastDocNo, "備查文號"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); }
/// <summary> /// 新生異動 /// </summary> public UpdateRecordInfo03(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List <XElement> UpdateCodeElms, bool isInsert) { InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); cbxClass.DropDownWidth = 300; _UpdateRec = UpdateRec; _prlp = prlp; _UpdateCodeElms = UpdateCodeElms; _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); _epUpdateCode = new ErrorProvider(); _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); _faldn = new UpdateRecordModule_SH_D.Utility.FormAndLogDataManager(_prlp); // 新增帶入預設 if (isInsert) { // 載入資料 // 載入預設前級畢業資訊 Dictionary <string, DAL.SchoolData> schoolDataDict = new Dictionary <string, DAL.SchoolData>(); foreach (XElement elm in BL.Get.JHSchoolList().Elements("學校")) { DAL.SchoolData sd = new DAL.SchoolData(); sd.SchoolCode = elm.Attribute("代碼").Value; sd.SchoolLocation = elm.Attribute("所在地").Value; sd.SchoolName = elm.Attribute("名稱").Value; sd.SchoolLocationCode = elm.Attribute("所在地代碼").Value; if (sd.SchoolCode.Length > 3) { sd.SchoolType = sd.SchoolCode.Substring(2, 1); } string s1 = elm.Attribute("所在地").Value + elm.Attribute("名稱").Value; if (!schoolDataDict.ContainsKey(s1)) { schoolDataDict.Add(s1, sd); } if (!schoolDataDict.ContainsKey(sd.SchoolName)) { schoolDataDict.Add(sd.SchoolName, sd); } } SHBeforeEnrollmentRecord brfRec = SHBeforeEnrollment.SelectByStudentID(_UpdateRec.StudentID); if (string.IsNullOrEmpty(_UpdateRec.GraduateSchool)) { _UpdateRec.GraduateSchool = brfRec.School; } if (string.IsNullOrEmpty(_UpdateRec.GraduateSchoolYear)) { _UpdateRec.GraduateSchoolYear = brfRec.GraduateSchoolYear; } // 用學校名稱解析 if (!string.IsNullOrEmpty(brfRec.School)) { string key = brfRec.SchoolLocation.Replace("台", "臺") + brfRec.School.Trim(); if (schoolDataDict.ContainsKey(key)) { if (string.IsNullOrEmpty(_UpdateRec.GraduateSchoolCode)) { _UpdateRec.GraduateSchoolCode = schoolDataDict[key].SchoolCode; _UpdateRec.GraduateSchoolLocationCode = schoolDataDict[key].SchoolLocationCode; } } } } cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "資格代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); txtISchool = _faldn.SetFormData(_UpdateRec.GraduateSchool, txtISchool, "入學資格(畢業國中)"); txtISpaceCode = _faldn.SetFormData(_UpdateRec.GraduateSchoolLocationCode, txtISpaceCode, "所在地代碼"); txtISchoolCode = _faldn.SetFormData(_UpdateRec.GraduateSchoolCode, txtISchoolCode, "畢業國中學校代號"); txtIJHGradeYear = _faldn.SetFormData(_UpdateRec.GraduateSchoolYear, txtIJHGradeYear, "國中畢業年度"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); txtGradeDoc = _faldn.SetFormData(_UpdateRec.GraduateDocument, txtGradeDoc, "入學資格證明文件"); }
/// <summary> /// 學籍異動 /// </summary> public UpdateRecordInfo01(SHUpdateRecordRecord UpdateRec, PermRecLogProcess prlp, List <XElement> UpdateCodeElms) { SHUpdateRecordRecord rec = new SHUpdateRecordRecord(); InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); cbxClass.DropDownWidth = 300; _UpdateRec = UpdateRec; _prlp = prlp; _UpdateCodeElms = UpdateCodeElms; _epUpdateCode = new ErrorProvider(); _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList = SHDepartment.SelectAll(); // 更正學籍顯示對照用 _updateCodeDict4 = new Dictionary <string, string>(); // 日進校不同,所以需要檢查: // 日校 _updateCodeDict4.Add("401", "新學號"); _updateCodeDict4.Add("402", "新姓名"); _updateCodeDict4.Add("403", "新性別"); _updateCodeDict4.Add("404", "新籍貫"); _updateCodeDict4.Add("405", "新生日"); _updateCodeDict4.Add("406", "新科別"); _updateCodeDict4.Add("407", "新身分證號"); _updateCodeDict4.Add("408", "入學資格學校名稱"); _updateCodeDict4.Add("409", "特殊身分"); _updateCodeDict4.Add("499", "其他學籍事項"); if (string.IsNullOrEmpty(_UpdateRec.ExpectGraduateSchoolYear)) { SHLeaveInfoRecord shl = SHLeaveInfo.SelectByStudentID(_UpdateRec.StudentID); if (shl.SchoolYear.HasValue) { _UpdateRec.ExpectGraduateSchoolYear = shl.SchoolYear.Value.ToString(); } } _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); _faldn = new UpdateRecordModule_SH_D.Utility.FormAndLogDataManager(_prlp); if (!string.IsNullOrEmpty(_UpdateRec.NewStudentNumber)) { int i; if (int.TryParse(_UpdateRec.NewStudentNumber.Trim(), out i)) { _UpdateRec.NewData = i.ToString(); _UpdateRec.NewStudentNumber = i.ToString(); } else { _UpdateRec.NewStudentNumber = ""; } } // 載入資料 cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "異動代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment, txtMemo, "備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus, txtSpecial, "特殊身分代碼"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber, txtStudentNumber, "學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber, txtIDNumber, "身分證字號"); txtNewData = _faldn.SetFormData(_UpdateRec.NewData, txtNewData, "新資料"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment, txtIDNumber1, "註1"); txtIDNumber2 = _faldn.SetFormData(_UpdateRec.Comment2, txtIDNumber2, "註2"); dtLastUpdateDate = _faldn.SetFormData(_UpdateRec.LastADDate, dtLastUpdateDate, "備查日期"); txtLastDocNo = _faldn.SetFormData(_UpdateRec.LastADNumber, txtLastDocNo, "備查文號"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtSHSchoolYear = _faldn.SetFormData(_UpdateRec.ExpectGraduateSchoolYear, txtSHSchoolYear, "應畢業學年度"); txtC7SchoolCode = _faldn.SetFormData(_UpdateRec.Code7SchoolCode, txtC7SchoolCode, "借讀學校代碼"); txtC7DeptCode = _faldn.SetFormData(_UpdateRec.Code7DeptCode, txtC7DeptCode, "借讀科別代碼"); dtC71BeginDate = _faldn.SetFormData(_UpdateRec.Code71BeginDate, dtC71BeginDate, "申請開始日期"); dtC71EndDate = _faldn.SetFormData(_UpdateRec.Code71EndDate, dtC71EndDate, "申請結束日期"); dtC72BeginDate = _faldn.SetFormData(_UpdateRec.Code72BeginDate, dtC72BeginDate, "實際開始日期"); dtC72EndDate = _faldn.SetFormData(_UpdateRec.Code72EndDate, dtC72EndDate, "實際結束日期"); txtReplicatedSchoolRollNumber = _faldn.SetFormData(_UpdateRec.ReplicatedSchoolRollNumber, txtReplicatedSchoolRollNumber, "雙重學籍編號"); }
/// <summary> /// 學籍異動 /// </summary> public UpdateRecordInfo01() { SHUpdateRecordRecord rec = new SHUpdateRecordRecord(); InitializeComponent(); cbxGender.Items.Add("男"); cbxGender.Items.Add("女"); _UpdateRec = UpdateRec; _prlp = prlp; _UpdateCodeElms = UpdateCodeElms; _epUpdateCode = new ErrorProvider(); _UpdateCoodeList = (from x in _UpdateCodeElms select x.Element("代號").Value + " " + x.Element("原因及事項").Value).ToList(); _DeptList =SHDepartment.SelectAll(); // 更正學籍顯示對照用 _updateCodeDict4 = new Dictionary<string, string>(); // 日進校不同,所以需要檢查: // 日校 _updateCodeDict4.Add("401", "新學號"); _updateCodeDict4.Add("402", "新姓名"); _updateCodeDict4.Add("403", "新性別"); _updateCodeDict4.Add("404", "新籍貫"); _updateCodeDict4.Add("405", "新生日"); _updateCodeDict4.Add("406", "新科別"); _updateCodeDict4.Add("407", "新身分證號"); _updateCodeDict4.Add("408", "入學資格學校名稱"); _updateCodeDict4.Add("409", "特殊身分"); _updateCodeDict4.Add("499", "其他學籍事項"); if (string.IsNullOrEmpty(_UpdateRec.ExpectGraduateSchoolYear)) { SHLeaveInfoRecord shl = SHLeaveInfo.SelectByStudentID(_UpdateRec.StudentID); if(shl.SchoolYear.HasValue ) _UpdateRec.ExpectGraduateSchoolYear = shl.SchoolYear.Value.ToString(); } _UCodeDict = Utility.UITool.ConvertUpdateCodeDescDict(_UpdateCodeElms); _faldn = new UpdateRecordModule_SH_D.Utility.FormAndLogDataManager(_prlp); if (!string.IsNullOrEmpty(_UpdateRec.NewStudentNumber)) { int i; if (int.TryParse(_UpdateRec.NewStudentNumber.Trim(), out i)) { _UpdateRec.NewData = i.ToString(); _UpdateRec.NewStudentNumber = i.ToString(); } else _UpdateRec.NewStudentNumber = ""; } // 載入資料 cbxUpdateCode = _faldn.SetFormData(_UpdateRec.UpdateCode, cbxUpdateCode, "異動代碼"); txtDesc = _faldn.SetFormData(_UpdateRec.UpdateDescription, txtDesc, "原因及事項"); dtUpdateDate = _faldn.SetFormData(_UpdateRec.UpdateDate, dtUpdateDate, "異動日期"); txtMemo = _faldn.SetFormData(_UpdateRec.Comment,txtMemo,"備註"); cbxDept = _faldn.SetFormData(_UpdateRec.Department, cbxDept, "科別"); cbxClass = _faldn.SetFormData(_UpdateRec.ClassType, cbxClass, "班別"); txtSpecial = _faldn.SetFormData(_UpdateRec.SpecialStatus,txtSpecial,"特殊身分代碼"); txtName = _faldn.SetFormData(_UpdateRec.StudentName, txtName, "姓名"); txtStudentNumber = _faldn.SetFormData(_UpdateRec.StudentNumber ,txtStudentNumber,"學號"); txtIDNumber = _faldn.SetFormData(_UpdateRec.IDNumber,txtIDNumber,"身分證字號"); txtNewData = _faldn.SetFormData(_UpdateRec.NewData, txtNewData, "新資料"); txtIDNumber1 = _faldn.SetFormData(_UpdateRec.IDNumberComment,txtIDNumber1,"註1"); txtIDNumber2 = _faldn.SetFormData(_UpdateRec.Comment2 , txtIDNumber2, "註2"); dtLastUpdateDate = _faldn.SetFormData(_UpdateRec.LastADDate, dtLastUpdateDate, "備查日期"); txtLastDocNo = _faldn.SetFormData(_UpdateRec.LastADNumber, txtLastDocNo, "備查文號"); dtADDate = _faldn.SetFormData(_UpdateRec.ADDate, dtADDate, "核准日期"); txtADDocNo = _faldn.SetFormData(_UpdateRec.ADNumber, txtADDocNo, "核准文號"); cbxGender = _faldn.SetFormData(_UpdateRec.Gender, cbxGender, "性別"); dtBirthday = _faldn.SetFormData(_UpdateRec.Birthdate, dtBirthday, "生日"); txtSHSchoolYear = _faldn.SetFormData(_UpdateRec.ExpectGraduateSchoolYear, txtSHSchoolYear, "應畢業學年度"); }