From 1fa6b5f7d84c35bbcc91e5b10675509c01ca7e61 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 17 Mar 2023 18:27:28 +0000 Subject: [PATCH] B2023-035 Added SelectedChildToPrint to the ProcedureInfo class to hold the unit selected when printing a Child procedure. Used for BNPP Alarm data. --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index ad6c9c02..62723a83 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -7245,6 +7245,12 @@ namespace VEPROMS.CSLA.Library [Serializable()] public partial class ProcedureInfo : ItemInfo, IVEDrillDownReadOnly { + public int _SelectedChildToPrint = 0; //B2023-035 for BNPP Alarms - the unit (child) that was selected to print) + public int SelectedChildToPrint + { + get { return _SelectedChildToPrint; } + set { _SelectedChildToPrint = value; } + } // C2021-027: Procedure level PC/PC. these 2 methods determine whether a procedure is included, either by an integer index // or by a string name of the unit public bool ApplInclude(int ApplicabilityIndex) @@ -7441,7 +7447,9 @@ namespace VEPROMS.CSLA.Library } //jcb add 20120501 item and children by unit - public static ProcedureInfo GetItemAndChildrenByUnit(int? itemID, int? parentID, int? unitID, bool isAutomatic = false) + // B2023-035 Pass in the selected child (selectedSlave) that was selected from Print + + public static ProcedureInfo GetItemAndChildrenByUnit(int? itemID, int? parentID, int? unitID, bool isAutomatic = false, int selectedUnitToPrint = 0) { try { @@ -7449,6 +7457,7 @@ namespace VEPROMS.CSLA.Library // Added Optional Parameter "bool isAutomatic = false" to disable the RofstLoadingStatus pop-up screen when printing baselines ProcedureInfo tmp = DataPortal.Fetch(new ItemAndChildrenByUnitCriteria(itemID, parentID, unitID)); + tmp.SelectedChildToPrint = selectedUnitToPrint; //B2023-035 save the selected child selected from Print AddToCache(tmp); if (tmp.ErrorMessage == "No Record Found") tmp = null; if (tmp != null)