Added code to get ROs by AccPageID and GetChildren by ROType
This commit is contained in:
parent
6d298bfbfd
commit
0cb99bcf5e
@ -671,6 +671,12 @@ namespace VEPROMS.CSLA.Library
|
||||
if (child != null) return ((rochild)child).value;
|
||||
return null;
|
||||
}
|
||||
public int? GetROTypeByAccPagID(string accPageID, string spDefault, string igDefault)
|
||||
{
|
||||
rochild? child = GetRoChildByAccPagID(accPageID, spDefault, igDefault);
|
||||
if (child != null) return ((rochild)child).type;
|
||||
return null;
|
||||
}
|
||||
public rochild? GetRoChildByAccPagID(string accPageID, string spDefault, string igDefault)
|
||||
{
|
||||
if (_dicROAPID == null)
|
||||
@ -743,7 +749,30 @@ namespace VEPROMS.CSLA.Library
|
||||
idx = str.IndexOfAny(delim.ToCharArray());
|
||||
return idx;
|
||||
}
|
||||
|
||||
public List<rochild> GetRoChildrenByType(int type)
|
||||
{
|
||||
List<rochild> children = new List<rochild>();
|
||||
AddRoChildByType(children, type);
|
||||
return children;
|
||||
}
|
||||
private void AddRoChildByType(List<rochild> children, int type)
|
||||
{
|
||||
foreach (rodbi dbi in myHdr.myDbs)
|
||||
{
|
||||
if (dbi.children != null)
|
||||
AddRoChildByType(dbi.children,children,type);
|
||||
}
|
||||
}
|
||||
private void AddRoChildByType(rochild[] roChildren, List<rochild> children, int type)
|
||||
{
|
||||
foreach (rochild child in roChildren)
|
||||
{
|
||||
if (child.type == type && child.value != null)
|
||||
children.Add(child);
|
||||
if (child.children != null)
|
||||
AddRoChildByType(child.children,children,type);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user