private string GetXmlString(T_OA_BUSINESSTRIP Info, string StrSource) { string goouttomeet = string.Empty; string privateaffair = string.Empty; string companycar = string.Empty; string isagent = string.Empty; string path = string.Empty; SMT.SaaS.MobileXml.MobileXml mx = new MobileXml.MobileXml(); SMT.SaaS.MobileXml.AutoDictionary ad = new MobileXml.AutoDictionary(); List <SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List <SMT.SaaS.MobileXml.AutoDictionary>(); AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CHECKSTATE", Master_Golbal.CHECKSTATE, GetCheckState(Master_Golbal.CHECKSTATE))); //审核状态 if (Master_Golbal.OWNERID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERNAME)) //出差人 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CURRENTEMPLOYEENAME", Common.CurrentLoginUserInfo.EmployeeName, Common.CurrentLoginUserInfo.EmployeeName)); AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERID", Master_Golbal.OWNERID, Master_Golbal.OWNERNAME + "-" + Master_Golbal.OWNERPOSTNAME + "-" + Master_Golbal.OWNERDEPARTMENTNAME + "-" + Master_Golbal.OWNERCOMPANYNAME)); } if (Master_Golbal.OWNERCOMPANYID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERCOMPANYNAME))//所属公司 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERCOMPANYID", Master_Golbal.OWNERCOMPANYID, Master_Golbal.OWNERCOMPANYNAME)); } if (Master_Golbal.OWNERDEPARTMENTID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERDEPARTMENTNAME))//所属部门 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERDEPARTMENTID", Master_Golbal.OWNERDEPARTMENTID, Master_Golbal.OWNERDEPARTMENTNAME)); } if (Master_Golbal.OWNERPOSTID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERPOSTNAME))//所属岗位 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERPOSTID", Master_Golbal.OWNERPOSTID, Master_Golbal.OWNERPOSTNAME)); } if (fbCtr.ExtensionalOrder.TOTALMONEY != null && fbCtr.ExtensionalOrder.TOTALMONEY > 0)//借款金额 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CHARGEMONEY", Master_Golbal.CHARGEMONEY.ToString(), fbCtr.ExtensionalOrder.TOTALMONEY.ToString())); } AutoList.Add(basedata("T_OA_BUSINESSTRIP", "POSTLEVEL", Master_Golbal.POSTLEVEL, string.Empty)); //出差人的岗位级别 //AutoList.Add(basedata("T_OA_BUSINESSTRIP", "DEPARTMENTNAME", string.Empty, Master_Golbal.OWNERDEPARTMENTNAME));//出差人所在部门 if (Master_Golbal.ISAGENT != null) //是否启用代理 { if (Master_Golbal.ISAGENT == "0") { isagent = "不启用"; } else { isagent = "启用"; } AutoList.Add(basedata("T_OA_BUSINESSTRIP", "ISAGENT", Master_Golbal.ISAGENT, isagent)); } AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CONTENT", Master_Golbal.CONTENT, Master_Golbal.CONTENT));//出差事由 //添加出差行程修改相关逻辑 if (string.IsNullOrEmpty(Info.ISALTERTRAVE)) { string msg = "新提交的出差申请。"; AutoList.Add(basedata("T_OA_BUSINESSTRIP", "AlterTraveDetailBefore", msg, msg));//出差事由 } else { if (Info.ISALTERTRAVE == "1") { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "AlterTraveDetailBefore", Master_Golbal.ALTERDETAILBEFORE, Master_Golbal.ALTERDETAILBEFORE));//出差事由 } } foreach (T_OA_BUSINESSTRIPDETAIL objDetail in TraveDetailList_Golbal)//填充子表 { if (objDetail.DEPCITY != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "DEPCITY", objDetail.DEPCITY, GetCityName(objDetail.DEPCITY), objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.DESTCITY != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "DESTCITY", objDetail.DESTCITY, GetCityName(objDetail.DESTCITY), objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.BUSINESSDAYS != null)//出差天数 { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "BUSINESSDAYS", objDetail.BUSINESSDAYS, objDetail.BUSINESSDAYS, objDetail.BUSINESSTRIPDETAILID)); } else { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "BUSINESSDAYS", string.Empty, string.Empty, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.PRIVATEAFFAIR != null) { if (objDetail.PRIVATEAFFAIR == "0")//是否私事 { privateaffair = "否"; } else { privateaffair = "是"; } AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "PRIVATEAFFAIR", objDetail.PRIVATEAFFAIR, privateaffair, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.GOOUTTOMEET != null) { if (objDetail.GOOUTTOMEET == "0")//内部会议\培训 { goouttomeet = "否"; } else { goouttomeet = "是"; } AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "GOOUTTOMEET", objDetail.GOOUTTOMEET, goouttomeet, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.COMPANYCAR != null) { if (objDetail.COMPANYCAR == "0")//是否是公司派车 { companycar = "否"; } else { companycar = "是"; } AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "COMPANYCAR", objDetail.COMPANYCAR, companycar, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.TYPEOFTRAVELTOOLS != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "TYPEOFTRAVELTOOLS", objDetail.TYPEOFTRAVELTOOLS, GetTypeName(objDetail.TYPEOFTRAVELTOOLS), objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.TAKETHETOOLLEVEL != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "TAKETHETOOLLEVEL", objDetail.TAKETHETOOLLEVEL, GetLevelName(objDetail.TAKETHETOOLLEVEL, GetTypeId(objDetail.TYPEOFTRAVELTOOLS)), objDetail.BUSINESSTRIPDETAILID)); } } string a = mx.TableToXml(Info, TraveDetailList_Golbal, StrSource, AutoList); return(a); }
private string GetXmlString(string StrSource, T_OA_APPROVALINFO Info) { string StrReturn = ""; try { SMT.SaaS.MobileXml.MobileXml mx = new MobileXml.MobileXml(); List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>(); AutoList.Add(basedata("T_OA_APPROVALINFO", "CHECKSTATE", approvalInfo.CHECKSTATE, "审核中")); AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERCOMPANYID", approvalInfo.OWNERCOMPANYID, StrCompanyName)); AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERDEPARTMENTID", approvalInfo.OWNERDEPARTMENTID, StrDepartmentName)); AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERPOSTID", approvalInfo.OWNERPOSTID, StrPostName)); AutoList.Add(basedata("T_OA_APPROVALINFO", "OWNERID", approvalInfo.OWNERID, approvalInfo.OWNERNAME + "-" + StrPostName + "-" + StrDepartmentName + "-" + StrCompanyName)); AutoList.Add(basedata("T_OA_APPROVALINFO", "TYPEAPPROVAL", approvalInfo.TYPEAPPROVAL, StrApprovalTypeName)); AutoList.Add(basedata("T_OA_APPROVALINFO", "CONTENT", approvalInfo.APPROVALID, approvalInfo.APPROVALID)); AutoList.Add(basedata("T_OA_APPROVALINFO", "AttachMent", approvalInfo.APPROVALID, approvalInfo.APPROVALID)); AutoList.Add(basedata("T_OA_APPROVALINFO", "POSTLEVEL", postLevel, postLevel)); StrReturn = mx.TableToXml(Info, "a", StrSource, AutoList); //string a = mx.TableToXml(Info, "a", str, AutoList); } catch (Exception ex) { Logger.Current.Log(ex.Message, Category.Debug, Priority.Low); } return StrReturn; }
private string GetXmlString(T_OA_TRAVELREIMBURSEMENT Info, string StrSource) { string goouttomeet = string.Empty; string privateaffair = string.Empty; string companycar = string.Empty; string isagent = string.Empty; string path = string.Empty; string chargetype = string.Empty; string ExtTotal = ""; if (fbCtr.ListDetail.Count() > 0) { decimal totalMoney = this.fbCtr.ListDetail.Sum(item => { return((item.Entity as T_FB_EXTENSIONORDERDETAIL).APPLIEDMONEY); }); ExtTotal = totalMoney.ToString(); } SMT.SaaS.MobileXml.MobileXml mx = new MobileXml.MobileXml(); SMT.SaaS.MobileXml.AutoDictionary ad = new MobileXml.AutoDictionary(); List <SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List <SMT.SaaS.MobileXml.AutoDictionary>(); AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "CHECKSTATE", TravelReimbursement_Golbal.CHECKSTATE, GetCheckState(TravelReimbursement_Golbal.CHECKSTATE))); //审核状态 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "BUSINESSTRIPID", businesstrID, string.Empty)); //出差申请ID AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "AVAILABLECREDIT", UsableMoney, string.Empty)); //可用额度 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "REIMBURSEMENTSTANDARDS", textStandards.Text, string.Empty)); //报销标准 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "REIMBURSEMENTOFCOSTS", fbCtr.Order.TOTALMONEY.ToString(), string.Empty)); //报销总计 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "POSTLEVEL", EmployeePostLevel, string.Empty)); //出差人的岗位级别 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "CONTENT", TravelReimbursement_Golbal.CONTENT, TravelReimbursement_Golbal.CONTENT)); //报告内容 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "REMARKS", TravelReimbursement_Golbal.REMARKS, string.Empty)); //备注 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "PAYMENTINFO", fbCtr.Order.PAYMENTINFO, string.Empty)); //支付信息 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "PAYTARGET", ExtTotal, string.Empty)); //小计 StrPayInfo = txtPAYMENTINFO.Text.ToString(); AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "PAYMENTINFO", StrPayInfo, string.Empty)); //支付信息 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "TRAVLEAREAALLOWANCE", textStandards.Text, string.Empty)); //报销标准 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "AttachMent", TravelReimbursement_Golbal.TRAVELREIMBURSEMENTID, TravelReimbursement_Golbal.TRAVELREIMBURSEMENTID)); //附件 if (!string.IsNullOrEmpty(TravelReimbursement_Golbal.NOBUDGETCLAIMS)) //报销单号 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "NOBUDGETCLAIMS", TravelReimbursement_Golbal.NOBUDGETCLAIMS, string.Empty)); //报销单号 } if (TravelReimbursement_Golbal.CLAIMSWERE != null && !string.IsNullOrEmpty(EmployeeName)) //报销人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "CLAIMSWERE", TravelReimbursement_Golbal.CLAIMSWERE, EmployeeName + "-" + postName + "-" + depName + "-" + companyName)); } if (TravelReimbursement_Golbal.OWNERID != null && !string.IsNullOrEmpty(EmployeeName))//所属人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERID", TravelReimbursement_Golbal.OWNERID, EmployeeName)); } if (TravelReimbursement_Golbal.OWNERCOMPANYID != null && !string.IsNullOrEmpty(companyName))//所属公司 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERCOMPANYID", TravelReimbursement_Golbal.OWNERCOMPANYID, companyName)); } if (TravelReimbursement_Golbal.OWNERDEPARTMENTID != null && !string.IsNullOrEmpty(depName))//所属部门 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERDEPARTMENTID", TravelReimbursement_Golbal.OWNERDEPARTMENTID, depName)); } if (TravelReimbursement_Golbal.OWNERPOSTID != null && !string.IsNullOrEmpty(postName))//所属岗位 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERPOSTID", TravelReimbursement_Golbal.OWNERPOSTID, postName)); } foreach (T_OA_REIMBURSEMENTDETAIL objDetail in TravelDetailList_Golbal) //填充子表 { if (objDetail.BUSINESSDAYS != null) //出差天数 { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "BUSINESSDAYS", objDetail.BUSINESSDAYS, objDetail.BUSINESSDAYS, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.THENUMBEROFNIGHTS != null)//住宿天数 { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "THENUMBEROFNIGHTS", objDetail.THENUMBEROFNIGHTS, objDetail.THENUMBEROFNIGHTS, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.DEPCITY != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "DEPCITY", objDetail.DEPCITY, SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(objDetail.DEPCITY), objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.DESTCITY != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "DESTCITY", objDetail.DESTCITY, SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(objDetail.DESTCITY), objDetail.REIMBURSEMENTDETAILID)); } if (TravelReimbursement_Golbal.CREATEUSERID != null)//创建人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERID", TravelReimbursement_Golbal.CREATEUSERID, Common.CurrentLoginUserInfo.EmployeeName, objDetail.REIMBURSEMENTDETAILID)); } if (TravelReimbursement_Golbal.UPDATEUSERID != null)//修改人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERID", TravelReimbursement_Golbal.UPDATEUSERID, Common.CurrentLoginUserInfo.EmployeeName, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.OTHERCOSTS != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "OTHERCOSTS", objDetail.OTHERCOSTS.ToString(), string.Empty, objDetail.REIMBURSEMENTDETAILID)); } else //如果没有其他费用就传空值给Xml { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "OTHERCOSTS", string.Empty, string.Empty, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.PRIVATEAFFAIR != null) { if (objDetail.PRIVATEAFFAIR == "0")//是否私事 { privateaffair = "否"; } else { privateaffair = "是"; } AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "PRIVATEAFFAIR", objDetail.PRIVATEAFFAIR, privateaffair, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.GOOUTTOMEET != null) { if (objDetail.GOOUTTOMEET == "0")//内部会议\培训 { goouttomeet = "否"; } else { goouttomeet = "是"; } AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "GOOUTTOMEET", objDetail.GOOUTTOMEET, goouttomeet, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.COMPANYCAR != null) { if (objDetail.COMPANYCAR == "0")//是否是公司派车 { companycar = "否"; } else { companycar = "是"; } AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "COMPANYCAR", objDetail.COMPANYCAR, companycar, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.TYPEOFTRAVELTOOLS != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "TYPEOFTRAVELTOOLS", objDetail.TYPEOFTRAVELTOOLS, GetTypeName(objDetail.TYPEOFTRAVELTOOLS), objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.TAKETHETOOLLEVEL != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "TAKETHETOOLLEVEL", objDetail.TAKETHETOOLLEVEL, GetLevelName(objDetail.TAKETHETOOLLEVEL, GetTypeId(objDetail.TYPEOFTRAVELTOOLS)), objDetail.REIMBURSEMENTDETAILID)); } } ObservableCollection <Object> TrListObj = new ObservableCollection <Object>(); foreach (var item in TravelDetailList_Golbal) { TrListObj.Add(item); } if (fbCtr.ListDetail.Count > 0)//获取算控件中的数据 { //SMT.Saas.Tools.FBServiceWS.T_FB_EXTENSIONALORDER entext = fbCtr //fbCtr.Order.REMARK string StrType = ""; if (fbCtr.Order.REMARK != null) { AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "FBREMARK", fbCtr.Order.REMARK, fbCtr.Order.REMARK, fbCtr.Order.EXTENSIONALORDERID)); //科目报销备注 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "FBREMARK", fbCtr.Order.REMARK, fbCtr.Order.REMARK)); //科目报销备注,同时加入主表 } if (fbCtr.Order.APPLYTYPE == 1) { StrType = "个人费用报销"; } if (fbCtr.Order.APPLYTYPE == 2) { StrType = "冲借款"; } if (!string.IsNullOrEmpty(StrType)) { AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "EXTENSIONTYPE", StrType, StrType, fbCtr.Order.EXTENSIONALORDERID)); //科目报销备注 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "EXTENSIONTYPE", StrType, StrType)); //科目报销备注,同时加入主表 } foreach (FBEntity item in fbCtr.ListDetail) //预算费用报销明细 { SMT.Saas.Tools.FBServiceWS.T_FB_EXTENSIONORDERDETAIL entTemp = item.Entity as SMT.Saas.Tools.FBServiceWS.T_FB_EXTENSIONORDERDETAIL; TrListObj.Add(entTemp); if (entTemp.CHARGETYPE != null) { if (entTemp.CHARGETYPE.ToString() == "1") { chargetype = "个人预算费用"; } else { chargetype = "部门预算费用"; } AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "CHARGETYPE", entTemp.CHARGETYPE.ToString(), chargetype, entTemp.EXTENSIONORDERDETAILID)); //费用类型 } AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "SUBJECTCODE", entTemp.T_FB_SUBJECT.SUBJECTCODE, entTemp.T_FB_SUBJECT.SUBJECTCODE, entTemp.EXTENSIONORDERDETAILID)); //科目编号 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "SUBJECTNAME", entTemp.T_FB_SUBJECT.SUBJECTNAME, entTemp.T_FB_SUBJECT.SUBJECTNAME, entTemp.EXTENSIONORDERDETAILID)); //科目名称 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "USABLEMONEY", entTemp.USABLEMONEY.ToString(), entTemp.USABLEMONEY.ToString(), entTemp.EXTENSIONORDERDETAILID)); //可用金额 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "REMARK", entTemp.REMARK, entTemp.REMARK, entTemp.EXTENSIONORDERDETAILID)); //摘要 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "APPLIEDMONEY", entTemp.APPLIEDMONEY.ToString(), entTemp.APPLIEDMONEY.ToString(), entTemp.EXTENSIONORDERDETAILID)); //申领金额 } } //冲借款明细 if (fbCtr.ListBorrowDetail.Count() > 0) { foreach (T_FB_CHARGEAPPLYREPAYDETAIL item in fbCtr.ListBorrowDetail)//预算费用报销明细 { TrListObj.Add(item); if (item.REPAYTYPE != null) { switch (item.REPAYTYPE.ToString()) { case "1": chargetype = "现金还普通借款"; break; case "2": chargetype = "现金还备用金借款"; break; case "3": chargetype = "现金还专项借款"; break; } AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "CHARGETYPE", item.REPAYTYPE.ToString(), chargetype, item.CHARGEAPPLYREPAYDETAILID));//费用类型 } if (item.BORROWMONEY != null) { AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "BORROWMONEY", item.BORROWMONEY.ToString(), item.BORROWMONEY.ToString(), item.CHARGEAPPLYREPAYDETAILID));//科目编号 } AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "REMARK", item.REMARK, item.REMARK, item.CHARGEAPPLYREPAYDETAILID));//摘要 if (item.REPAYMONEY != null) { AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "REPAYMONEY", item.REPAYMONEY.ToString(), item.REPAYMONEY.ToString(), item.CHARGEAPPLYREPAYDETAILID));//申领金额 } } } //string a = mx.TableToXml(Info, TrListObj, StrSource, AutoList); string a = mx.TableToXmlForTravel(Info, TrListObj, StrSource, AutoList); return(a); }
private string GetXmlString(string StrSource, T_OA_SENDDOC Info) { #region Xml字符串 #endregion SMT.SaaS.MobileXml.MobileXml mx = new MobileXml.MobileXml(); List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>(); if (tmpSendDocT == null) return ""; string StrCheck = ""; switch (tmpSendDocT.CHECKSTATE) { case "0": StrCheck = "未提交"; break; case "1": StrCheck = "审核中"; break; case "2": StrCheck = "审核通过"; break; case "3": StrCheck = "审核不通过"; break; } AutoList.Add(basedata("T_OA_SENDDOC", "CHECKSTATE", tmpSendDocT.CHECKSTATE, StrCheck)); AutoList.Add(basedata("T_OA_SENDDOC", "OWNERCOMPANYID", tmpSendDocT.OWNERCOMPANYID, CompanyName)); AutoList.Add(basedata("T_OA_SENDDOC", "OWNERDEPARTMENTID", tmpSendDocT.OWNERDEPARTMENTID, DepartmentName)); AutoList.Add(basedata("T_OA_SENDDOC", "OWNERPOSTID", tmpSendDocT.OWNERPOSTID, PostName)); AutoList.Add(basedata("T_OA_SENDDOC", "OWNERID", tmpSendDocT.OWNERID, tmpSendDocT.OWNERNAME + "-" + PostName + "-" + DepartmentName + "-" + CompanyName)); AutoList.Add(basedata("T_OA_SENDDOC", "GRADED", tmpSendDocT.GRADED, tmpGrade)); AutoList.Add(basedata("T_OA_SENDDOC", "PRIORITIES", tmpSendDocT.PRIORITIES, tmpProri)); AutoList.Add(basedata("T_OA_SENDDOC", "ISREDDOC", tmpSendDocT.ISREDDOC, tmpIsRed)); AutoList.Add(basedata("T_OA_SENDDOC", "CONTENT", tmpSendDocT.SENDDOCID, tmpSendDocT.SENDDOCID)); AutoList.Add(basedata("T_OA_SENDDOC", "AttachMent", tmpSendDocT.SENDDOCID, tmpSendDocT.SENDDOCID)); AutoList.Add(basedata("T_OA_SENDDOC", "ISDISTRIBUTE", tmpSendDocT.ISDISTRIBUTE, tmpSendDocT.ISDISTRIBUTE == "0" ? "否" : "是")); AutoList.Add(basedata("T_OA_SENDDOC", "ISSAVE", tmpSendDocT.ISSAVE, tmpSendDocT.ISSAVE == "0" ? "否" : "是")); AutoList.Add(basedata("T_OA_SENDDOC", "DEPARTID", tmpSendDocT.DEPARTID, StrSendDepartment)); if (tmpSendDocT.T_OA_SENDDOCTYPE != null) { //AutoList.Add(basedata("T_OA_SENDDOC", "SENDDOCTYPE", tmpSendDocT.T_OA_SENDDOCTYPE.SENDDOCTYPEID, tmpSendDocT.T_OA_SENDDOCTYPE.SENDDOCTYPE)); //把公文类型ID改为公文类型名字 AutoList.Add(basedata("T_OA_SENDDOC", "SENDDOCTYPE", tmpSendDocT.T_OA_SENDDOCTYPE.SENDDOCTYPE, tmpSendDocT.T_OA_SENDDOCTYPE.SENDDOCTYPE)); } string StrReturn = mx.TableToXml(Info, "a", StrSource, AutoList); return StrReturn; }
private string GetXmlString(T_OA_BUSINESSTRIP Info, string StrSource) { string goouttomeet = string.Empty; string privateaffair = string.Empty; string companycar = string.Empty; string isagent = string.Empty; string path = string.Empty; SMT.SaaS.MobileXml.MobileXml mx = new MobileXml.MobileXml(); SMT.SaaS.MobileXml.AutoDictionary ad = new MobileXml.AutoDictionary(); List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>(); AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CHECKSTATE", Master_Golbal.CHECKSTATE, GetCheckState(Master_Golbal.CHECKSTATE)));//审核状态 if (Master_Golbal.OWNERID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERNAME))//出差人 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CURRENTEMPLOYEENAME", Common.CurrentLoginUserInfo.EmployeeName, Common.CurrentLoginUserInfo.EmployeeName)); AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERID", Master_Golbal.OWNERID, Master_Golbal.OWNERNAME + "-" + Master_Golbal.OWNERPOSTNAME + "-" + Master_Golbal.OWNERDEPARTMENTNAME + "-" + Master_Golbal.OWNERCOMPANYNAME)); } if (Master_Golbal.OWNERCOMPANYID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERCOMPANYNAME))//所属公司 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERCOMPANYID", Master_Golbal.OWNERCOMPANYID, Master_Golbal.OWNERCOMPANYNAME)); } if (Master_Golbal.OWNERDEPARTMENTID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERDEPARTMENTNAME))//所属部门 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERDEPARTMENTID", Master_Golbal.OWNERDEPARTMENTID, Master_Golbal.OWNERDEPARTMENTNAME)); } if (Master_Golbal.OWNERPOSTID != null && !string.IsNullOrEmpty(Master_Golbal.OWNERPOSTNAME))//所属岗位 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "OWNERPOSTID", Master_Golbal.OWNERPOSTID, Master_Golbal.OWNERPOSTNAME)); } if (fbCtr.ExtensionalOrder.TOTALMONEY != null && fbCtr.ExtensionalOrder.TOTALMONEY > 0)//借款金额 { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CHARGEMONEY", Master_Golbal.CHARGEMONEY.ToString(), fbCtr.ExtensionalOrder.TOTALMONEY.ToString())); } AutoList.Add(basedata("T_OA_BUSINESSTRIP", "POSTLEVEL", Master_Golbal.POSTLEVEL, string.Empty));//出差人的岗位级别 //AutoList.Add(basedata("T_OA_BUSINESSTRIP", "DEPARTMENTNAME", string.Empty, Master_Golbal.OWNERDEPARTMENTNAME));//出差人所在部门 if (Master_Golbal.ISAGENT != null)//是否启用代理 { if (Master_Golbal.ISAGENT == "0") { isagent = "不启用"; } else { isagent = "启用"; } AutoList.Add(basedata("T_OA_BUSINESSTRIP", "ISAGENT", Master_Golbal.ISAGENT, isagent)); } AutoList.Add(basedata("T_OA_BUSINESSTRIP", "CONTENT", Master_Golbal.CONTENT, Master_Golbal.CONTENT));//出差事由 //添加出差行程修改相关逻辑 if (string.IsNullOrEmpty(Info.ISALTERTRAVE)) { string msg = "新提交的出差申请。"; AutoList.Add(basedata("T_OA_BUSINESSTRIP", "AlterTraveDetailBefore", msg, msg));//出差事由 }else { if(Info.ISALTERTRAVE=="1") { AutoList.Add(basedata("T_OA_BUSINESSTRIP", "AlterTraveDetailBefore", Master_Golbal.ALTERDETAILBEFORE, Master_Golbal.ALTERDETAILBEFORE));//出差事由 } } foreach (T_OA_BUSINESSTRIPDETAIL objDetail in TraveDetailList_Golbal)//填充子表 { if (objDetail.DEPCITY != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "DEPCITY", objDetail.DEPCITY, GetCityName(objDetail.DEPCITY), objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.DESTCITY != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "DESTCITY", objDetail.DESTCITY, GetCityName(objDetail.DESTCITY), objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.BUSINESSDAYS != null)//出差天数 { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "BUSINESSDAYS", objDetail.BUSINESSDAYS, objDetail.BUSINESSDAYS, objDetail.BUSINESSTRIPDETAILID)); } else { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "BUSINESSDAYS", string.Empty, string.Empty, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.PRIVATEAFFAIR != null) { if (objDetail.PRIVATEAFFAIR == "0")//是否私事 { privateaffair = "否"; } else { privateaffair = "是"; } AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "PRIVATEAFFAIR", objDetail.PRIVATEAFFAIR, privateaffair, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.GOOUTTOMEET != null) { if (objDetail.GOOUTTOMEET == "0")//内部会议\培训 { goouttomeet = "否"; } else { goouttomeet = "是"; } AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "GOOUTTOMEET", objDetail.GOOUTTOMEET, goouttomeet, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.COMPANYCAR != null) { if (objDetail.COMPANYCAR == "0")//是否是公司派车 { companycar = "否"; } else { companycar = "是"; } AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "COMPANYCAR", objDetail.COMPANYCAR, companycar, objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.TYPEOFTRAVELTOOLS != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "TYPEOFTRAVELTOOLS", objDetail.TYPEOFTRAVELTOOLS, GetTypeName(objDetail.TYPEOFTRAVELTOOLS), objDetail.BUSINESSTRIPDETAILID)); } if (objDetail.TAKETHETOOLLEVEL != null) { AutoList.Add(basedata("T_OA_BUSINESSTRIPDETAIL", "TAKETHETOOLLEVEL", objDetail.TAKETHETOOLLEVEL, GetLevelName(objDetail.TAKETHETOOLLEVEL, GetTypeId(objDetail.TYPEOFTRAVELTOOLS)), objDetail.BUSINESSTRIPDETAILID)); } } string a = mx.TableToXml(Info, TraveDetailList_Golbal, StrSource, AutoList); return a; }
private string GetXmlString(T_OA_TRAVELREIMBURSEMENT Info, string StrSource) { string goouttomeet = string.Empty; string privateaffair = string.Empty; string companycar = string.Empty; string isagent = string.Empty; string path = string.Empty; string chargetype = string.Empty; string ExtTotal = ""; if (fbCtr.ListDetail.Count() > 0) { decimal totalMoney = this.fbCtr.ListDetail.Sum(item => { return (item.Entity as T_FB_EXTENSIONORDERDETAIL).APPLIEDMONEY; }); ExtTotal = totalMoney.ToString(); } SMT.SaaS.MobileXml.MobileXml mx = new MobileXml.MobileXml(); SMT.SaaS.MobileXml.AutoDictionary ad = new MobileXml.AutoDictionary(); List<SMT.SaaS.MobileXml.AutoDictionary> AutoList = new List<SMT.SaaS.MobileXml.AutoDictionary>(); AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "CHECKSTATE", TravelReimbursement_Golbal.CHECKSTATE, GetCheckState(TravelReimbursement_Golbal.CHECKSTATE)));//审核状态 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "BUSINESSTRIPID", businesstrID, string.Empty));//出差申请ID AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "AVAILABLECREDIT", UsableMoney, string.Empty));//可用额度 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "REIMBURSEMENTSTANDARDS", textStandards.Text, string.Empty));//报销标准 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "REIMBURSEMENTOFCOSTS", fbCtr.Order.TOTALMONEY.ToString(), string.Empty));//报销总计 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "POSTLEVEL", EmployeePostLevel, string.Empty));//出差人的岗位级别 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "CONTENT", TravelReimbursement_Golbal.CONTENT, TravelReimbursement_Golbal.CONTENT));//报告内容 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "REMARKS", TravelReimbursement_Golbal.REMARKS, string.Empty));//备注 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "PAYMENTINFO", fbCtr.Order.PAYMENTINFO, string.Empty));//支付信息 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "PAYTARGET", ExtTotal, string.Empty));//小计 StrPayInfo = txtPAYMENTINFO.Text.ToString(); AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "PAYMENTINFO", StrPayInfo, string.Empty));//支付信息 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "TRAVLEAREAALLOWANCE", textStandards.Text, string.Empty));//报销标准 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "AttachMent", TravelReimbursement_Golbal.TRAVELREIMBURSEMENTID, TravelReimbursement_Golbal.TRAVELREIMBURSEMENTID));//附件 if (!string.IsNullOrEmpty(TravelReimbursement_Golbal.NOBUDGETCLAIMS))//报销单号 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "NOBUDGETCLAIMS", TravelReimbursement_Golbal.NOBUDGETCLAIMS, string.Empty));//报销单号 } if (TravelReimbursement_Golbal.CLAIMSWERE != null && !string.IsNullOrEmpty(EmployeeName))//报销人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "CLAIMSWERE", TravelReimbursement_Golbal.CLAIMSWERE, EmployeeName + "-" + postName + "-" + depName + "-" + companyName)); } if (TravelReimbursement_Golbal.OWNERID != null && !string.IsNullOrEmpty(EmployeeName))//所属人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERID", TravelReimbursement_Golbal.OWNERID, EmployeeName)); } if (TravelReimbursement_Golbal.OWNERCOMPANYID != null && !string.IsNullOrEmpty(companyName))//所属公司 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERCOMPANYID", TravelReimbursement_Golbal.OWNERCOMPANYID, companyName)); } if (TravelReimbursement_Golbal.OWNERDEPARTMENTID != null && !string.IsNullOrEmpty(depName))//所属部门 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERDEPARTMENTID", TravelReimbursement_Golbal.OWNERDEPARTMENTID, depName)); } if (TravelReimbursement_Golbal.OWNERPOSTID != null && !string.IsNullOrEmpty(postName))//所属岗位 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERPOSTID", TravelReimbursement_Golbal.OWNERPOSTID, postName)); } foreach (T_OA_REIMBURSEMENTDETAIL objDetail in TravelDetailList_Golbal)//填充子表 { if (objDetail.BUSINESSDAYS != null)//出差天数 { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "BUSINESSDAYS", objDetail.BUSINESSDAYS, objDetail.BUSINESSDAYS, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.THENUMBEROFNIGHTS != null)//住宿天数 { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "THENUMBEROFNIGHTS", objDetail.THENUMBEROFNIGHTS, objDetail.THENUMBEROFNIGHTS, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.DEPCITY != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "DEPCITY", objDetail.DEPCITY, SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(objDetail.DEPCITY), objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.DESTCITY != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "DESTCITY", objDetail.DESTCITY, SMT.SaaS.FrameworkUI.Common.Utility.GetCityName(objDetail.DESTCITY), objDetail.REIMBURSEMENTDETAILID)); } if (TravelReimbursement_Golbal.CREATEUSERID != null)//创建人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERID", TravelReimbursement_Golbal.CREATEUSERID, Common.CurrentLoginUserInfo.EmployeeName, objDetail.REIMBURSEMENTDETAILID)); } if (TravelReimbursement_Golbal.UPDATEUSERID != null)//修改人 { AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "OWNERID", TravelReimbursement_Golbal.UPDATEUSERID, Common.CurrentLoginUserInfo.EmployeeName, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.OTHERCOSTS != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "OTHERCOSTS", objDetail.OTHERCOSTS.ToString(), string.Empty, objDetail.REIMBURSEMENTDETAILID)); } else //如果没有其他费用就传空值给Xml { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "OTHERCOSTS", string.Empty, string.Empty, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.PRIVATEAFFAIR != null) { if (objDetail.PRIVATEAFFAIR == "0")//是否私事 { privateaffair = "否"; } else { privateaffair = "是"; } AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "PRIVATEAFFAIR", objDetail.PRIVATEAFFAIR, privateaffair, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.GOOUTTOMEET != null) { if (objDetail.GOOUTTOMEET == "0")//内部会议\培训 { goouttomeet = "否"; } else { goouttomeet = "是"; } AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "GOOUTTOMEET", objDetail.GOOUTTOMEET, goouttomeet, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.COMPANYCAR != null) { if (objDetail.COMPANYCAR == "0")//是否是公司派车 { companycar = "否"; } else { companycar = "是"; } AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "COMPANYCAR", objDetail.COMPANYCAR, companycar, objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.TYPEOFTRAVELTOOLS != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "TYPEOFTRAVELTOOLS", objDetail.TYPEOFTRAVELTOOLS, GetTypeName(objDetail.TYPEOFTRAVELTOOLS), objDetail.REIMBURSEMENTDETAILID)); } if (objDetail.TAKETHETOOLLEVEL != null) { AutoList.Add(basedata("T_OA_REIMBURSEMENTDETAIL", "TAKETHETOOLLEVEL", objDetail.TAKETHETOOLLEVEL, GetLevelName(objDetail.TAKETHETOOLLEVEL, GetTypeId(objDetail.TYPEOFTRAVELTOOLS)), objDetail.REIMBURSEMENTDETAILID)); } } ObservableCollection<Object> TrListObj = new ObservableCollection<Object>(); foreach (var item in TravelDetailList_Golbal) { TrListObj.Add(item); } if (fbCtr.ListDetail.Count > 0)//获取算控件中的数据 { //SMT.Saas.Tools.FBServiceWS.T_FB_EXTENSIONALORDER entext = fbCtr //fbCtr.Order.REMARK string StrType = ""; if (fbCtr.Order.REMARK != null) { AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "FBREMARK", fbCtr.Order.REMARK, fbCtr.Order.REMARK, fbCtr.Order.EXTENSIONALORDERID));//科目报销备注 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "FBREMARK", fbCtr.Order.REMARK, fbCtr.Order.REMARK));//科目报销备注,同时加入主表 } if (fbCtr.Order.APPLYTYPE == 1) { StrType = "个人费用报销"; } if (fbCtr.Order.APPLYTYPE == 2) { StrType = "冲借款"; } if (!string.IsNullOrEmpty(StrType)) { AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "EXTENSIONTYPE", StrType, StrType, fbCtr.Order.EXTENSIONALORDERID));//科目报销备注 AutoList.Add(basedata("T_OA_TRAVELREIMBURSEMENT", "EXTENSIONTYPE", StrType, StrType));//科目报销备注,同时加入主表 } foreach (FBEntity item in fbCtr.ListDetail)//预算费用报销明细 { SMT.Saas.Tools.FBServiceWS.T_FB_EXTENSIONORDERDETAIL entTemp = item.Entity as SMT.Saas.Tools.FBServiceWS.T_FB_EXTENSIONORDERDETAIL; TrListObj.Add(entTemp); if (entTemp.CHARGETYPE != null) { if (entTemp.CHARGETYPE.ToString() == "1") { chargetype = "个人预算费用"; } else { chargetype = "部门预算费用"; } AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "CHARGETYPE", entTemp.CHARGETYPE.ToString(), chargetype, entTemp.EXTENSIONORDERDETAILID));//费用类型 } AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "SUBJECTCODE", entTemp.T_FB_SUBJECT.SUBJECTCODE, entTemp.T_FB_SUBJECT.SUBJECTCODE, entTemp.EXTENSIONORDERDETAILID));//科目编号 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "SUBJECTNAME", entTemp.T_FB_SUBJECT.SUBJECTNAME, entTemp.T_FB_SUBJECT.SUBJECTNAME, entTemp.EXTENSIONORDERDETAILID));//科目名称 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "USABLEMONEY", entTemp.USABLEMONEY.ToString(), entTemp.USABLEMONEY.ToString(), entTemp.EXTENSIONORDERDETAILID));//可用金额 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "REMARK", entTemp.REMARK, entTemp.REMARK, entTemp.EXTENSIONORDERDETAILID));//摘要 AutoList.Add(basedata("T_FB_EXTENSIONORDERDETAIL", "APPLIEDMONEY", entTemp.APPLIEDMONEY.ToString(), entTemp.APPLIEDMONEY.ToString(), entTemp.EXTENSIONORDERDETAILID));//申领金额 } } //冲借款明细 if (fbCtr.ListBorrowDetail.Count() > 0) { foreach (T_FB_CHARGEAPPLYREPAYDETAIL item in fbCtr.ListBorrowDetail)//预算费用报销明细 { TrListObj.Add(item); if (item.REPAYTYPE != null) { switch (item.REPAYTYPE.ToString()) { case "1": chargetype = "现金还普通借款"; break; case "2": chargetype = "现金还备用金借款"; break; case "3": chargetype = "现金还专项借款"; break; } AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "CHARGETYPE", item.REPAYTYPE.ToString(), chargetype, item.CHARGEAPPLYREPAYDETAILID));//费用类型 } if (item.BORROWMONEY != null) { AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "BORROWMONEY", item.BORROWMONEY.ToString(), item.BORROWMONEY.ToString(), item.CHARGEAPPLYREPAYDETAILID));//科目编号 } AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "REMARK", item.REMARK, item.REMARK, item.CHARGEAPPLYREPAYDETAILID));//摘要 if (item.REPAYMONEY != null) { AutoList.Add(basedata("T_FB_CHARGEAPPLYREPAYDETAIL", "REPAYMONEY", item.REPAYMONEY.ToString(), item.REPAYMONEY.ToString(), item.CHARGEAPPLYREPAYDETAILID));//申领金额 } } } //string a = mx.TableToXml(Info, TrListObj, StrSource, AutoList); string a = mx.TableToXmlForTravel(Info, TrListObj, StrSource, AutoList); return a; }