B2018-146 Added a new method (IsBackgroundStepOrChild) to determine if the current step is part of a background step for WCN

This commit is contained in:
Rich 2018-11-09 18:42:25 +00:00
parent dad929da41
commit a6ecdda3d6

View File

@ -3754,6 +3754,7 @@ namespace VEPROMS.CSLA.Library
// B2018-114 check for a null before getting the Ordinal value (code that uses this handles a Null return value from this Get
ItemInfo srcItem = ItemInfo.Get(eds[0].ItemID);
if (srcItem == null) return null;
if (srcItem.IsHigh) return srcItem.Ordinal;
// B2018-118: the LinkedOrdinal count must take into account cautions versus notes types:
ItemInfo hls = srcItem.MyHLS;
@ -4385,6 +4386,21 @@ namespace VEPROMS.CSLA.Library
}
return false;
}
// B2018-146 Find any steep that is part of a background step.
public bool IsBackgroundStepOrChild()
{
if (ActiveFormat.PlantFormat.FormatData.SectData.StepSectionData.WolfCreekBackgroundFormat)
{
ItemInfo tmp = this;
while (tmp != null && tmp.IsStep)
{
if (tmp.IsHigh || tmp.IsCaution || tmp.IsNote) return true;
if (tmp.MyParent != null && tmp.MyParent.IsStep && tmp.MyParent.FormatStepData.Type.ToUpper() == "TITLEWITHTEXTBELOW" && tmp.FormatStepData.Type.ToUpper() != "IMPLICITOR") return true;
tmp = tmp.ActiveParent as ItemInfo;
}
}
return false;
}
// Function to find if in part of a Background Step
public bool IsPartOfBackgroundStep()
{
@ -6540,14 +6556,12 @@ namespace VEPROMS.CSLA.Library
set { _IncludeSpecialCharacters = value; }
}
private string _UnitPrefix;
public string UnitPrefix
{
get { return _UnitPrefix; }
set { _UnitPrefix = value; }
}
private string _ApplicSetting;
public string ApplicSetting
{
get { return _ApplicSetting; }