修改XML保存路径

This commit is contained in:
admin
2021-01-13 12:39:34 +08:00
parent 1fc87ae94b
commit 3474049b41
2 changed files with 6 additions and 5 deletions

1
.gitignore vendored
View File

@@ -339,3 +339,4 @@ ASALocalRun/
# BeatPulse healthcheck temp database
healthchecksdb
/NX.ERP.WebAPi/binXMLDOM
/NX.ERP.WebAPi/XMLDOM

View File

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