private FISCA.DSAClient.Envelope makeStudReqDoc(DataRow row, string studNo) { string studID = this.getStudID(studNo); FISCA.DSAClient.Envelope result = new FISCA.DSAClient.Envelope(); StringBuilder sb = new StringBuilder("<Students><Student>"); if ( Util.GetFieldValue(row, "STU_CNAME") == "吳水木") { System.Console.WriteLine("pause !"); } sb.Append(string.Format("<Name>{0}</Name>", Util.GetFieldValue(row, "STU_CNAME"))); sb.Append(string.Format("<EnglishName>{0}</EnglishName>", Util.GetFieldValue(row, "stu_ename"))); sb.Append(string.Format("<StudentNumber>{0}</StudentNumber>", studNo)); sb.Append(string.Format("<Birthdate>{0}</Birthdate>", makeDateValue(Util.GetFieldValue(row, "B_DATE")))); sb.Append(string.Format("<Nationality>{0}</Nationality>", Util.GetFieldValue(row, "N_NAME"))); sb.Append(string.Format("<Gender>{0}</Gender>", (Util.GetFieldValue(row, "SEX") =="M" ? "1" : "0") )); sb.Append(string.Format("<Status>{0}</Status>", convertUpdateCodeToIschoolStatus(Util.GetFieldValue(row, "Tr2")))); sb.Append(string.Format("<PreviousSchool>{0}</PreviousSchool>", Util.GetFieldValue(row, "s_name"))); if (string.IsNullOrWhiteSpace(studID)) //新增 sb.Append("<NewID></NewID>"); else //修改 sb.Append(string.Format("<ID>{0}</ID>", studID )); sb.Append("</Student></Students>"); string xml = sb.ToString(); return new FISCA.DSAClient.Envelope(new FISCA.DSAClient.XmlHelper(xml)); }
private FISCA.DSAClient.Envelope makeStudExtReqDoc(DataRow row, string studNo, string studID) { FISCA.DSAClient.Envelope result = new FISCA.DSAClient.Envelope(); StringBuilder sb = new StringBuilder("<Students><Student>"); sb.Append(string.Format("<StudentID>{0}</StudentID>", studID )); sb.Append(string.Format("<DropOutCode>{0}</DropOutCode>", Util.GetFieldValue(row, "RC1"))); sb.Append(string.Format("<GradeYear>{0}</GradeYear>", Util.GetFieldValue(row, "YEAR"))); sb.Append(string.Format("<IsDelay>{0}</IsDelay>", (Util.GetFieldValue(row, "B_DATE")=="*" ? "t" :"f"))); sb.Append(string.Format("<IDCode>{0}</IDCode>", Util.GetFieldValue(row, "ID"))); sb.Append(string.Format("<IsInSchool>{0}</IsInSchool>", (Util.GetFieldValue(row, "Tr1") != "*" ? "t" : "f"))); sb.Append(string.Format("<Nationality>{0}</Nationality>", Util.GetFieldValue(row, "N_NAME"))); sb.Append(string.Format("<PreviousSchool>{0}</PreviousSchool>", Util.GetFieldValue(row, "s_name"))); //sb.Append(string.Format("<DeptGroupID>{0}</DeptGroupID>", GetDeptGroupID(Util.GetFieldValue(row, "DPT_CODE")))); sb.Append(string.Format("<DeptGroupCode>{0}</DeptGroupCode>", Util.GetFieldValue(row, "DPT_CODE"))); sb.Append(string.Format("<TransferDeptSchoolyearSemester>{0}</TransferDeptSchoolyearSemester>", Util.GetFieldValue(row, "Ts"))); sb.Append(string.Format("<TransferPreviousDept>{0}</TransferPreviousDept>", Util.GetFieldValue(row, "Ts3_dpt"))); sb.Append(string.Format("<UpdateCode>{0}</UpdateCode>", Util.GetFieldValue(row, "Tr2"))); sb.Append(string.Format("<UpdateSchoolyearSemester>{0}</UpdateSchoolyearSemester>", Util.GetFieldValue(row, "Tr"))); sb.Append(string.Format("<Suspension1>{0}</Suspension1>", Util.GetFieldValue(row, "R_QR1"))); sb.Append(string.Format("<Suspension2>{0}</Suspension2>", Util.GetFieldValue(row, "R_QR2"))); sb.Append(string.Format("<Suspension3>{0}</Suspension3>", Util.GetFieldValue(row, "R_QR3"))); sb.Append(string.Format("<Suspension4>{0}</Suspension4>", Util.GetFieldValue(row, "R_QR4"))); sb.Append(string.Format("<Suspension5>{0}</Suspension5>", Util.GetFieldValue(row, "R_QR5"))); sb.Append(string.Format("<Suspension6>{0}</Suspension6>", Util.GetFieldValue(row, "R_QR6"))); sb.Append(string.Format("<Suspension7>{0}</Suspension7>", Util.GetFieldValue(row, "R_QR7"))); sb.Append(string.Format("<Suspension8>{0}</Suspension8>", Util.GetFieldValue(row, "R_QR8"))); if (this.dsaStudExts.ContainsKey(studNo)) sb.Append(string.Format("<UID>{0}</UID>", this.dsaStudExts[studNo])); else sb.Append("<NewID></NewID>"); sb.Append("</Student></Students>"); string xml = sb.ToString(); return new FISCA.DSAClient.Envelope(new FISCA.DSAClient.XmlHelper(xml)); }