From 290d2c8abf33177d032ce400518736a9abe13e24 Mon Sep 17 00:00:00 2001 From: John Date: Wed, 29 Oct 2014 14:58:33 +0000 Subject: [PATCH] =?UTF-8?q?Fixed=20issue=20getting=20the=20parent=E2=80=99?= =?UTF-8?q?s=20config=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs | 2 +- PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs index a064fc09..0e734892 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/ProcConfig.cs @@ -73,9 +73,9 @@ namespace VEPROMS.CSLA.Library ProcedureInfo proc = _Procedure != null ? _Procedure.MyProcedureInfo : _ProcedureInfo; while (proc.ActiveParent.IsProcedure) { + proc = (ProcedureInfo)proc.ActiveParent; retval = proc.ProcedureConfig.GetValue(args.Group, args.Item); if (retval != string.Empty) return retval; - proc = (ProcedureInfo)proc.ActiveParent; } DocVersionInfo docVersion = proc.ActiveParent as DocVersionInfo; if (docVersion == null) return string.Empty; diff --git a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs index 320dc35d..d7a39e73 100644 --- a/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs +++ b/PROMS/VEPROMS.CSLA.Library/Config/SectionConfig.cs @@ -67,9 +67,9 @@ namespace VEPROMS.CSLA.Library SectionInfo sect = _Section != null ? _Section.MySectionInfo : _SectionInfo; while (sect.ActiveParent.IsSection) { + sect = (sect.ActiveParent as SectionInfo) ?? SectionInfo.Get((sect.ActiveParent as ItemInfo).ItemID); retval = sect.SectionConfig.GetValue(args.Group, args.Item); if (retval != string.Empty) return retval; - sect = (sect.ActiveParent as SectionInfo) ?? SectionInfo.Get((sect.ActiveParent as ItemInfo).ItemID); } // There may be levels of procedures, i.e. procedures within a procedure. ProcedureInfo proc = sect.MyProcedure;