修改模板路径
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -340,3 +340,4 @@ ASALocalRun/
|
|||||||
healthchecksdb
|
healthchecksdb
|
||||||
/NX.ERP.WebAPi/binXMLDOM
|
/NX.ERP.WebAPi/binXMLDOM
|
||||||
/NX.ERP.WebAPi/XMLDOM
|
/NX.ERP.WebAPi/XMLDOM
|
||||||
|
/NX.ERP.WebAPi/xml
|
||||||
|
|||||||
@@ -15,11 +15,29 @@ namespace NX.ERP.U8.Store
|
|||||||
|
|
||||||
private string BaseUrl;
|
private string BaseUrl;
|
||||||
|
|
||||||
|
private static string BasePath;
|
||||||
|
|
||||||
|
private const string FLODER_NAME = "xml";
|
||||||
|
|
||||||
|
static VoucherBase()
|
||||||
|
{
|
||||||
|
BasePath = System.IO.Path.Combine(AppDomain.CurrentDomain.BaseDirectory, FLODER_NAME);
|
||||||
|
|
||||||
|
if (!Directory.Exists(BasePath))
|
||||||
|
{
|
||||||
|
Directory.CreateDirectory(BasePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private string BodyFile
|
private string BodyFile
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return $"{AppDomain.CurrentDomain.BaseDirectory}\\XMLDOM\\XMLDomBody{this.voucherID}.xml";
|
return System.IO.Path.Combine(BasePath, $"XMLDomBody{this.voucherID}.xml");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -28,7 +46,8 @@ namespace NX.ERP.U8.Store
|
|||||||
|
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return $"{AppDomain.CurrentDomain.BaseDirectory}\\XMLDOM\\XMLDomHead{this.voucherID}.xml";
|
return System.IO.Path.Combine(BasePath, $"XMLDomHead{this.voucherID}.xml");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected string LoadUrl
|
protected string LoadUrl
|
||||||
@@ -257,16 +276,12 @@ namespace NX.ERP.U8.Store
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void LoadTemplate()
|
private void LoadTemplate()
|
||||||
{
|
{
|
||||||
VoucherParameter rdVoucherParameter = null;
|
VoucherParameter rdVoucherParameter = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (!Directory.Exists(AppDomain.CurrentDomain.BaseDirectory + "XMLDOM"))
|
|
||||||
{
|
|
||||||
Directory.CreateDirectory(AppDomain.CurrentDomain.BaseDirectory + "XMLDOM");
|
|
||||||
}
|
|
||||||
rdVoucherParameter = new VoucherParameter
|
rdVoucherParameter = new VoucherParameter
|
||||||
{
|
{
|
||||||
VoucherType = this.VoucherID,
|
VoucherType = this.VoucherID,
|
||||||
|
|||||||
Reference in New Issue
Block a user