From 3474049b41a3f93a81c55984def3d691f3bee26e Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 13 Jan 2021 12:39:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9XML=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + NX.ERP.U8/Store/VoucherBase.cs | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 2d2c6be..9814b93 100644 --- a/.gitignore +++ b/.gitignore @@ -339,3 +339,4 @@ ASALocalRun/ # BeatPulse healthcheck temp database healthchecksdb /NX.ERP.WebAPi/binXMLDOM +/NX.ERP.WebAPi/XMLDOM diff --git a/NX.ERP.U8/Store/VoucherBase.cs b/NX.ERP.U8/Store/VoucherBase.cs index 5e99cfc..28618e2 100644 --- a/NX.ERP.U8/Store/VoucherBase.cs +++ b/NX.ERP.U8/Store/VoucherBase.cs @@ -60,7 +60,7 @@ namespace NX.ERP.U8.Store private string GetHeadTemplate() { - var strTemlate = FileHelp.ReadFile(AppDomain.CurrentDomain.RelativeSearchPath + $"XMLDOM\\XMLDomHead{this.voucherID}.xml"); + var strTemlate = FileHelp.ReadFile(AppDomain.CurrentDomain.BaseDirectory + $"XMLDOM\\XMLDomHead{this.voucherID}.xml"); if (strTemlate == string.Empty) { this.LoadTemplate(); @@ -71,7 +71,7 @@ namespace NX.ERP.U8.Store private string GetBodyTemplate() { - var strTemlate = FileHelp.ReadFile(AppDomain.CurrentDomain.RelativeSearchPath + $"XMLDOM\\XMLDomBody{this.voucherID}.xml"); + var strTemlate = FileHelp.ReadFile(AppDomain.CurrentDomain.BaseDirectory + $"XMLDOM\\XMLDomBody{this.voucherID}.xml"); if (strTemlate == string.Empty) { this.LoadTemplate(); @@ -86,7 +86,7 @@ namespace NX.ERP.U8.Store VoucherParameter rdVoucherParameter = null; try { - if (!Directory.Exists(AppDomain.CurrentDomain.RelativeSearchPath + "XMLDOM")) + if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + "XMLDOM")) { Directory.CreateDirectory(AppDomain.CurrentDomain.RelativeSearchPath + "XMLDOM"); } @@ -96,8 +96,8 @@ namespace NX.ERP.U8.Store U8LoginContext.Instance.LoadRdVoucher(this.LoadUrl, rdVoucherParameter); if (rdVoucherParameter.ReturnValue) { - FileHelp.WriteFile(rdVoucherParameter.DomHead.xml, AppDomain.CurrentDomain.RelativeSearchPath + $"XMLDOM\\XMLDomHead{this.voucherID}.xml"); - FileHelp.WriteFile(rdVoucherParameter.DomBody.xml, AppDomain.CurrentDomain.RelativeSearchPath + $"XMLDOM\\XMLDomBody{this.voucherID}.xml"); + FileHelp.WriteFile(rdVoucherParameter.DomHead.xml, AppDomain.CurrentDomain.BaseDirectory + $"XMLDOM\\XMLDomHead{this.voucherID}.xml"); + FileHelp.WriteFile(rdVoucherParameter.DomBody.xml, AppDomain.CurrentDomain.BaseDirectory + $"XMLDOM\\XMLDomBody{this.voucherID}.xml"); } }