Fixed issue getting the parent’s config values
This commit is contained in:
parent
9e565cfd05
commit
290d2c8abf
@ -73,9 +73,9 @@ namespace VEPROMS.CSLA.Library
|
|||||||
ProcedureInfo proc = _Procedure != null ? _Procedure.MyProcedureInfo : _ProcedureInfo;
|
ProcedureInfo proc = _Procedure != null ? _Procedure.MyProcedureInfo : _ProcedureInfo;
|
||||||
while (proc.ActiveParent.IsProcedure)
|
while (proc.ActiveParent.IsProcedure)
|
||||||
{
|
{
|
||||||
|
proc = (ProcedureInfo)proc.ActiveParent;
|
||||||
retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
|
retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
|
||||||
if (retval != string.Empty) return retval;
|
if (retval != string.Empty) return retval;
|
||||||
proc = (ProcedureInfo)proc.ActiveParent;
|
|
||||||
}
|
}
|
||||||
DocVersionInfo docVersion = proc.ActiveParent as DocVersionInfo;
|
DocVersionInfo docVersion = proc.ActiveParent as DocVersionInfo;
|
||||||
if (docVersion == null) return string.Empty;
|
if (docVersion == null) return string.Empty;
|
||||||
|
@ -67,9 +67,9 @@ namespace VEPROMS.CSLA.Library
|
|||||||
SectionInfo sect = _Section != null ? _Section.MySectionInfo : _SectionInfo;
|
SectionInfo sect = _Section != null ? _Section.MySectionInfo : _SectionInfo;
|
||||||
while (sect.ActiveParent.IsSection)
|
while (sect.ActiveParent.IsSection)
|
||||||
{
|
{
|
||||||
|
sect = (sect.ActiveParent as SectionInfo) ?? SectionInfo.Get((sect.ActiveParent as ItemInfo).ItemID);
|
||||||
retval = sect.SectionConfig.GetValue(args.Group, args.Item);
|
retval = sect.SectionConfig.GetValue(args.Group, args.Item);
|
||||||
if (retval != string.Empty) return retval;
|
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.
|
// There may be levels of procedures, i.e. procedures within a procedure.
|
||||||
ProcedureInfo proc = sect.MyProcedure;
|
ProcedureInfo proc = sect.MyProcedure;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user