diff --git a/NX.ERP.U8/Store/STVoucherBase.cs b/NX.ERP.U8/Store/STVoucherBase.cs
index b20aa11..245307f 100644
--- a/NX.ERP.U8/Store/STVoucherBase.cs
+++ b/NX.ERP.U8/Store/STVoucherBase.cs
@@ -120,21 +120,13 @@ namespace NX.ERP.U8.Store
///
private string GetHeadTemplate()
{
-
- if (!string.IsNullOrEmpty(strTemlateHead))
- {
- return strTemlateHead;
- }
- else
+ if (string.IsNullOrEmpty(strTemlateHead))
{
lock (lockHeadobj)
{
- if (!string.IsNullOrEmpty(strTemlateHead))
- {
- return strTemlateHead;
- }
- else
+ if (string.IsNullOrEmpty(strTemlateHead))
+
{
strTemlateHead = FileHelp.ReadFile(HeadFile);
if (string.IsNullOrEmpty(strTemlateHead))
@@ -142,16 +134,12 @@ namespace NX.ERP.U8.Store
this.LoadTemplate();
strTemlateHead = GetHeadTemplate();
}
- return strTemlateHead;
}
-
}
-
-
}
-
+ return strTemlateHead;
}
@@ -165,21 +153,12 @@ namespace NX.ERP.U8.Store
///
private string GetBodyTemplate()
{
-
- if (!string.IsNullOrEmpty(strTemlateBody))
- {
- return strTemlateBody;
- }
- else
+ if (string.IsNullOrEmpty(strTemlateBody))
{
lock (lockBodyobj)
{
+ if (string.IsNullOrEmpty(strTemlateBody))
- if (!string.IsNullOrEmpty(strTemlateBody))
- {
- return strTemlateHead;
- }
- else
{
strTemlateBody = FileHelp.ReadFile(BodyFile);
if (string.IsNullOrEmpty(strTemlateBody))
@@ -187,15 +166,10 @@ namespace NX.ERP.U8.Store
this.LoadTemplate();
strTemlateBody = GetHeadTemplate();
}
- return strTemlateBody;
-
}
-
-
}
-
-
}
+ return strTemlateBody;
}