B2017-004 Added a method to check if the current item is inside of a Note or Caution

This commit is contained in:
2017-08-29 15:21:24 +00:00
parent d42425cbc4
commit f45b4e491b
2 changed files with 19 additions and 3 deletions

View File

@@ -1579,7 +1579,21 @@ namespace VEPROMS.CSLA.Library
return ((FirstSibling.ItemPartCount > 0) && (FirstSibling.ItemParts[0].PartType == E_FromType.Note));
}
}
// B2017-004 check to see if step part is inside a Caution or Note (used to determin which Table types to include in the change step type list)
public bool IsInCautionOrNote
{
get
{
bool rval = false;
ItemInfo itm = this;
while (itm != null &&!itm.IsHigh && !rval)
{
rval = itm.IsCautionOrNotePart;
if (!rval) itm = itm.MyParent;
}
return rval;
}
}
public bool IsType(string type)
{
if ((int)MyContent.Type < 20000) return false;