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"); } }