Fixed NextItems logic
Replaced duplicate logic in GetChildren with MyItems Fixed logic to check for Sections = null
This commit is contained in:
@@ -725,7 +725,7 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
if (NextItemCount > 0 && NextItems.Count > 0)
|
||||
if (NextItemCount > 0 && NextItems != null && NextItems.Count > 0)
|
||||
return NextItems[0];
|
||||
return null;
|
||||
}
|
||||
|
@@ -111,7 +111,8 @@ namespace VEPROMS.CSLA.Library
|
||||
{ get { return (_MyItems != null ? _MyItems : _MyItems = ItemInfoList.GetList(_ItemID, _FromType)); } }
|
||||
public System.Collections.IList GetChildren()
|
||||
{
|
||||
return (_MyItems != null ? _MyItems : _MyItems = ItemInfoList.GetList(_ItemID, _FromType));
|
||||
//return (_MyItems != null ? _MyItems : _MyItems = ItemInfoList.GetList(_ItemID, _FromType));
|
||||
return MyItems;
|
||||
}
|
||||
//public bool ChildrenAreLoaded
|
||||
//{
|
||||
|
@@ -630,6 +630,8 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
int cntsect = 0;
|
||||
ItemInfo sect = TranGetSectionItem(tb._ToItem);
|
||||
if (tb._ToItem.MyProcedure.Sections == null)
|
||||
tb._ToItem.MyProcedure.MyContent.RefreshContentParts();
|
||||
foreach (ItemInfo ii in tb._ToItem.MyProcedure.Sections) if (ii.IsStepSection) cntsect++;
|
||||
// If Procedure going to has only 1 step section, do not add it.
|
||||
if (cntsect == 1) return false; // tb.TextAdded;
|
||||
|
Reference in New Issue
Block a user