From aeab40cb22d64ce1916ece4461f877ad4d73f612 Mon Sep 17 00:00:00 2001 From: gongxh Date: Sat, 29 May 2021 10:36:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NX.ERP.U8/Store/STVoucherBase.cs | 40 ++++++-------------------------- 1 file changed, 7 insertions(+), 33 deletions(-) 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; }