// 以後交給 DAL private void setSchoolInfoData(SchoolInfoEntity ScInfoEntity) { //Framework.Feature.Config.SetSchoolInfo(); // 學校基本資料 DSXmlHelper helper = new DSXmlHelper("GetSchoolInfoResponse"); helper.AddElement("SchoolInformation"); helper.AddElement("SchoolInformation", "ChineseName", ScInfoEntity.ChinsesName); helper.AddElement("SchoolInformation", "EnglishName", ScInfoEntity.EnglishName); helper.AddElement("SchoolInformation", "Address", ScInfoEntity.ChineseAddress); helper.AddElement("SchoolInformation", "EnglishAddress", ScInfoEntity.EnglishAddress); helper.AddElement("SchoolInformation", "Code", ScInfoEntity.Code); helper.AddElement("SchoolInformation", "Fax", ScInfoEntity.Fax); helper.AddElement("SchoolInformation", "Telephone", ScInfoEntity.Telephone); helper.AddElement("SchoolInformation", "ChancellorChineseName", ScInfoEntity.ChancellorChsName); helper.AddElement("SchoolInformation", "ChancellorEnglishName", ScInfoEntity.ChancellorEngName); helper.AddElement("SchoolInformation", "ChancellorCellPhone", ScInfoEntity.ChancellorCellPhone); helper.AddElement("SchoolInformation", "ChancellorEmail", ScInfoEntity.ChancellorEmail); helper.AddElement("SchoolInformation", "EduDirectorName", ScInfoEntity.EduDirectorName); helper.AddElement("SchoolInformation", "EduDirectorCellPhone", ScInfoEntity.EduDirectorCellPhone); helper.AddElement("SchoolInformation", "EduDirectorEmail", ScInfoEntity.EduDirectorEmail); helper.AddElement("SchoolInformation", "StuDirectorName", ScInfoEntity.StuDirectorName); helper.AddElement("SchoolInformation", "StuDirectorCellPhone", ScInfoEntity.StuDirectorCellPhone); helper.AddElement("SchoolInformation", "StuDirectorEmail", ScInfoEntity.StuDirectorEmail); helper.AddElement("SchoolInformation", "AssociatedWithName", ScInfoEntity.AssociatedWithName); helper.AddElement("SchoolInformation", "AssociatedWithCellPhone", ScInfoEntity.AssociatedWithCellPhone); helper.AddElement("SchoolInformation", "AssociatedWithEmail", ScInfoEntity.AssociatedWithEmail); helper.AddElement("SchoolInformation", "OtherTitle", ScInfoEntity.OtherTitle); helper.AddElement("SchoolInformation", "OtherName", ScInfoEntity.OtherName); helper.AddElement("SchoolInformation", "OtherCellPhone", ScInfoEntity.OtherCellPhone); helper.AddElement("SchoolInformation", "OtherEmail", ScInfoEntity.OtherEmail); Config.SetSchoolInfo(helper.BaseElement); // 學年度學期 DSXmlHelper helper1 = new DSXmlHelper("SetSystemConfigRequest"); helper1.AddElement("SystemConfig"); helper1.AddElement("SystemConfig", "DefaultSchoolYear", SchoolInfoEnt.SchoolYear); helper1.AddElement("SystemConfig", "DefaultSemester", SchoolInfoEnt.Semester); Config.SetSystemConfig(helper1.BaseElement); }
private void SchoolInfoMangement_Load(object sender, EventArgs e) { SchoolInfoEnt = getSchoolInfoData(); txtChancellorChsName.Text = SchoolInfoEnt.ChancellorChsName; txtChancellorEngName.Text = SchoolInfoEnt.ChancellorEngName; txtChancellorCellPhone.Text = SchoolInfoEnt.ChancellorCellPhone; txtChancellorEmail.Text = SchoolInfoEnt.ChancellorEmail; txtEduDirectorName.Text = SchoolInfoEnt.EduDirectorName; txtEduDirectorCellPhone.Text = SchoolInfoEnt.EduDirectorCellPhone; txtEduDirectorEmail.Text = SchoolInfoEnt.EduDirectorEmail; txtStuDirectorName.Text = SchoolInfoEnt.StuDirectorName; txtStuDirectorCellPhone.Text = SchoolInfoEnt.StuDirectorCellPhone; txtStuDirectorEmail.Text = SchoolInfoEnt.StuDirectorEmail; txtAssociatedWithName.Text = SchoolInfoEnt.AssociatedWithName; txtAssociatedWithCellPhone.Text = SchoolInfoEnt.AssociatedWithCellPhone; txtAssociatedWithEmail.Text = SchoolInfoEnt.AssociatedWithEmail; txtOtherTitle.Text = SchoolInfoEnt.OtherTitle; txtOtherName.Text = SchoolInfoEnt.OtherName; txtOtherCellPhone.Text = SchoolInfoEnt.OtherCellPhone; txtOtherEmail.Text = SchoolInfoEnt.OtherEmail; txtFax.Text = SchoolInfoEnt.Fax; txtPhone.Text = SchoolInfoEnt.Telephone; txtSchoolChsAddress.Text = SchoolInfoEnt.ChineseAddress; txtSchoolChsName.Text = SchoolInfoEnt.ChinsesName; txtSchoolCode.Text = SchoolInfoEnt.Code; txtSchoolEngAddess.Text = SchoolInfoEnt.EnglishAddress; txtSchoolEngName.Text = SchoolInfoEnt.EnglishName; if (!string.IsNullOrEmpty(SchoolInfoEnt.SchoolYear)) { intSchoolYear.Text = SchoolInfoEnt.SchoolYear; } if (!string.IsNullOrEmpty(SchoolInfoEnt.Semester)) { intSemester.Text = SchoolInfoEnt.Semester; } }
// 以後交給 DAL private SchoolInfoEntity getSchoolInfoData() { XmlElement Element = Config.GetSchoolInfo(); XmlElement sElement = Config.GetSystemConfig(); SchoolInfoEntity sie = new SchoolInfoEntity(); sie.ChinsesName = getNodeData("ChineseName", Element, "SchoolInformation"); sie.EnglishName = getNodeData("EnglishName", Element, "SchoolInformation"); sie.ChineseAddress = getNodeData("Address", Element, "SchoolInformation"); sie.EnglishAddress = getNodeData("EnglishAddress", Element, "SchoolInformation"); sie.Code = getNodeData("Code", Element, "SchoolInformation"); sie.Fax = getNodeData("Fax", Element, "SchoolInformation"); sie.Telephone = getNodeData("Telephone", Element, "SchoolInformation"); sie.SchoolYear = getNodeData("DefaultSchoolYear", sElement, "SystemConfig"); sie.Semester = getNodeData("DefaultSemester", sElement, "SystemConfig"); //校長 sie.ChancellorChsName = getNodeData("ChancellorChineseName", Element, "SchoolInformation"); sie.ChancellorEngName = getNodeData("ChancellorEnglishName", Element, "SchoolInformation"); sie.ChancellorCellPhone = getNodeData("ChancellorCellPhone", Element, "SchoolInformation"); sie.ChancellorEmail = getNodeData("ChancellorEmail", Element, "SchoolInformation"); //教務主任 sie.EduDirectorName = getNodeData("EduDirectorName", Element, "SchoolInformation"); sie.EduDirectorCellPhone = getNodeData("EduDirectorCellPhone", Element, "SchoolInformation"); sie.EduDirectorEmail = getNodeData("EduDirectorEmail", Element, "SchoolInformation"); //學務主任 sie.StuDirectorName = getNodeData("StuDirectorName", Element, "SchoolInformation"); sie.StuDirectorCellPhone = getNodeData("StuDirectorCellPhone", Element, "SchoolInformation"); sie.StuDirectorEmail = getNodeData("StuDirectorEmail", Element, "SchoolInformation"); sie.AssociatedWithName = getNodeData("AssociatedWithName", Element, "SchoolInformation"); sie.AssociatedWithCellPhone = getNodeData("AssociatedWithCellPhone", Element, "SchoolInformation"); sie.AssociatedWithEmail = getNodeData("AssociatedWithEmail", Element, "SchoolInformation"); sie.OtherTitle = getNodeData("OtherTitle", Element, "SchoolInformation"); sie.OtherName = getNodeData("OtherName", Element, "SchoolInformation"); sie.OtherCellPhone = getNodeData("OtherCellPhone", Element, "SchoolInformation"); sie.OtherEmail = getNodeData("OtherEmail", Element, "SchoolInformation"); return(sie); }