This commit is contained in:
parent
5e59fc2c34
commit
4c49f001ac
@ -47,24 +47,24 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
#region Events
|
||||
public event VETreeNodeEvent LoadingChildrenSQL;
|
||||
public event VETreeNodeEvent LoadingChildernMax;
|
||||
public event VETreeNodeEvent LoadingChildernValue;
|
||||
public event VETreeNodeEvent LoadingChildernDone;
|
||||
public event VETreeNodeEvent LoadingChildrenMax;
|
||||
public event VETreeNodeEvent LoadingChildrenValue;
|
||||
public event VETreeNodeEvent LoadingChildrenDone;
|
||||
private void OnLoadingChildrenSQL(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
if (LoadingChildrenSQL != null) LoadingChildrenSQL(sender, args);
|
||||
}
|
||||
private void OnLoadingChildrenMax(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
if (LoadingChildernMax != null) LoadingChildernMax(sender, args);
|
||||
if (LoadingChildrenMax != null) LoadingChildrenMax(sender, args);
|
||||
}
|
||||
private void OnLoadingChildrenValue(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
if (LoadingChildernValue != null) LoadingChildernValue(sender, args);
|
||||
if (LoadingChildrenValue != null) LoadingChildrenValue(sender, args);
|
||||
}
|
||||
private void OnLoadingChildrenDone(object sender, VETreeNodeEventArgs args)
|
||||
{
|
||||
if (LoadingChildernDone != null) LoadingChildernDone(sender, args);
|
||||
if (LoadingChildrenDone != null) LoadingChildrenDone(sender, args);
|
||||
}
|
||||
#endregion
|
||||
#region Business Methods
|
||||
@ -223,11 +223,27 @@ namespace VEPROMS.CSLA.Library
|
||||
private void ExpandChildren(IList ol)
|
||||
{
|
||||
int icnt = 0;
|
||||
bool lastWasSection = false;
|
||||
foreach (IVEDrillDownReadOnly o in ol)
|
||||
{
|
||||
OnLoadingChildrenValue(this, new VETreeNodeEventArgs(++icnt));
|
||||
//tNext("Cycle");
|
||||
try
|
||||
{
|
||||
bool skipIt = false;
|
||||
bool isStepPart = (o is PartInfo && (o as PartInfo).PartType == E_FromType.Step);
|
||||
if (isStepPart)
|
||||
{
|
||||
// get parent section and see if it has the Editable flag set. Only skip
|
||||
// if this flag is set to "N".
|
||||
ItemInfo sectInfo = (ItemInfo)(o as PartInfo).ActiveParent;
|
||||
if (sectInfo != null)
|
||||
{
|
||||
SectionConfig sc = sectInfo.MyConfig as SectionConfig;
|
||||
if (sc != null && sc.SubSection_Edit == "N") skipIt = true;
|
||||
}
|
||||
}
|
||||
if (!skipIt)
|
||||
{
|
||||
VETreeNode tmp = new VETreeNode(o, _allParts);
|
||||
if (o.HasChildren)
|
||||
@ -245,7 +261,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
else
|
||||
tmp._ChildrenLoaded = true;// Reset the children loaded flag
|
||||
if (lastWasSection)
|
||||
this.Nodes.Insert(0, tmp);
|
||||
else
|
||||
this.Nodes.Add(tmp);
|
||||
// if last thing was section & this is step, do insert - i.e. so that steps go before sections.
|
||||
lastWasSection = (o is PartInfo && (o as PartInfo).PartType == E_FromType.Section);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user