From a6ecdda3d638df456189ab01c0069e5f2e5251bc Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 9 Nov 2018 18:42:25 +0000 Subject: [PATCH] B2018-146 Added a new method (IsBackgroundStepOrChild) to determine if the current step is part of a background step for WCN --- .../VEPROMS.CSLA.Library/Extension/ItemExt.cs | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 9b839067..8a494238 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -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; }