This commit is contained in:
parent
621516d3ca
commit
04336831c3
@ -466,6 +466,23 @@ namespace VEPROMS.CSLA.Library
|
|||||||
return _PartInfoList[0].GetChildren();
|
return _PartInfoList[0].GetChildren();
|
||||||
return _PartInfoList;
|
return _PartInfoList;
|
||||||
}
|
}
|
||||||
|
public System.Collections.IList GetChildren(bool allParts)
|
||||||
|
{
|
||||||
|
_PartInfoList = this.MyContent.ContentParts;
|
||||||
|
if (allParts)
|
||||||
|
{
|
||||||
|
if (_PartInfoList.Count == 1 && (_PartInfoList[0].ToString() == "Sections" || _PartInfoList[0].ToString() == "Steps"))
|
||||||
|
return _PartInfoList[0].GetChildren();
|
||||||
|
return _PartInfoList;
|
||||||
|
}
|
||||||
|
else // Steps and Sections only
|
||||||
|
{
|
||||||
|
for(int i = 0;i<_PartInfoList.Count;i++)
|
||||||
|
if(_PartInfoList[i].ToString() == "Sections" || _PartInfoList[i].ToString() == "Steps")
|
||||||
|
return _PartInfoList[i].GetChildren();
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
//public bool ChildrenAreLoaded
|
//public bool ChildrenAreLoaded
|
||||||
//{
|
//{
|
||||||
// get { return _PartInfoList == null; }
|
// get { return _PartInfoList == null; }
|
||||||
|
@ -169,6 +169,10 @@ namespace VEPROMS.CSLA.Library
|
|||||||
// Console.WriteLine("{0}\t\"Total\"", TimeSpan.FromTicks(total).TotalMilliseconds);
|
// Console.WriteLine("{0}\t\"Total\"", TimeSpan.FromTicks(total).TotalMilliseconds);
|
||||||
//}
|
//}
|
||||||
public virtual void LoadChildren()
|
public virtual void LoadChildren()
|
||||||
|
{
|
||||||
|
LoadChildren(true);
|
||||||
|
}
|
||||||
|
public virtual void LoadChildren(bool allParts)
|
||||||
{
|
{
|
||||||
if (!_ChildrenLoaded)
|
if (!_ChildrenLoaded)
|
||||||
{
|
{
|
||||||
@ -176,11 +180,15 @@ namespace VEPROMS.CSLA.Library
|
|||||||
//tReset();
|
//tReset();
|
||||||
DateTime tStart = DateTime.Now;
|
DateTime tStart = DateTime.Now;
|
||||||
OnLoadingChildrenSQL(this, new VETreeNodeEventArgs());
|
OnLoadingChildrenSQL(this, new VETreeNodeEventArgs());
|
||||||
IList ol = _VEObject.GetChildren();
|
IList ol;
|
||||||
OnLoadingChildrenMax(this, new VETreeNodeEventArgs(ol.Count));
|
if(_VEObject.GetType().Name == "StepInfo" ||_VEObject.GetType().Name == "SectionInfo" ||_VEObject.GetType().Name == "ItemInfo" )
|
||||||
|
ol = ((ItemInfo)_VEObject).GetChildren(allParts);
|
||||||
|
else
|
||||||
|
ol = _VEObject.GetChildren();
|
||||||
//tNext("GetChildren");
|
//tNext("GetChildren");
|
||||||
if (ol != null)
|
if (ol != null)
|
||||||
{
|
{
|
||||||
|
OnLoadingChildrenMax(this, new VETreeNodeEventArgs(ol.Count));
|
||||||
this.TreeView.BeginUpdate();
|
this.TreeView.BeginUpdate();
|
||||||
int icnt = 0;
|
int icnt = 0;
|
||||||
foreach (IVEDrillDownReadOnly o in ol)
|
foreach (IVEDrillDownReadOnly o in ol)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user