This commit is contained in:
Kathy Ruffing 2012-09-27 11:05:07 +00:00
parent a9267ec40e
commit 31fb66002a
2 changed files with 7 additions and 6 deletions

View File

@ -56,9 +56,9 @@ namespace VEPROMS.CSLA.Library
if (args.AncestorLookup || ParentLookup)
{
string retval;
//ProcedureInfo proc = _Procedure.MyProcedureInfo;
// There may be levels of procedures, i.e. procedures within a procedure.
ProcedureInfo proc = _Procedure != null ? _Procedure.MyProcedureInfo : _ProcedureInfo;
while (proc.ActiveParent.GetType() == typeof(ProcedureInfo))
while (proc.ActiveParent.IsProcedure)
{
retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
if (retval != string.Empty) return retval;

View File

@ -63,18 +63,19 @@ namespace VEPROMS.CSLA.Library
if (args.AncestorLookup || ParentLookup)
{
string retval;
// There may be levels of sections, i.e. sections within a section.
SectionInfo sect = _Section != null ? _Section.MySectionInfo : _SectionInfo;
while (sect.ActiveParent.GetType() == typeof(SectionInfo))
while (sect.ActiveParent.IsSection)
{
retval = sect.SectionConfig.GetValue(args.Group, args.Item);
if (retval != string.Empty) return retval;
sect = (SectionInfo)sect.ActiveParent;
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 = ProcedureInfo.Get(((ItemInfo)sect.ActiveParent).ItemID);
//ProcedureInfo proc = (ProcedureInfo)sect.ActiveParent;
retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
if (retval != string.Empty) return retval;
while (proc.ActiveParent.GetType() == typeof(ProcedureInfo))
while (proc.ActiveParent.IsProcedure)
{
retval = proc.ProcedureConfig.GetValue(args.Group, args.Item);
if (retval != string.Empty) return retval;