From 278d74bf0b68eea345d4651dfeaf7639fe2538d3 Mon Sep 17 00:00:00 2001 From: John Date: Fri, 17 Mar 2023 18:26:23 +0000 Subject: [PATCH] =?UTF-8?q?B2023-035=20logic=20to=20ensure=20we=20get=20th?= =?UTF-8?q?e=20correct=20applicability=20information=20when=20printing=20a?= =?UTF-8?q?n=20entire=20procedure=20as=20the=20=E2=80=9COtherxxxx=E2=80=9D?= =?UTF-8?q?=20applicability=20setting.=20Used=20in=20BNPP=20Alarm=20data.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Extension/DocVersionExt.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs index a937bde9..b9c96d5c 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/DocVersionExt.cs @@ -459,6 +459,17 @@ namespace VEPROMS.CSLA.Library if (pi == null) return ""; + // B2023-035 for save the current select child (selectedSlave) and use the child number + // that was selected when printed. This is needed for when "Other" applicability + // values are referenced. For BNPP Alarms, sometimes the SelectedSlave value was set + // to the corresponding "Other" value, but we needed to use the selected child that was + // selected from the print button/menu in order to get the correct "Other" value. + int docVerSelectedSlave = DocVersionConfig.SelectedSlave; + int procInfoSelectedChildToPrint = pi.SelectedChildToPrint; + if (procInfoSelectedChildToPrint != 0) + { + DocVersionConfig.SelectedSlave = procInfoSelectedChildToPrint; + } string unitdes = "ID"; string prefix = null; string fromunitdes = null; @@ -506,7 +517,9 @@ namespace VEPROMS.CSLA.Library fromunitdes = DocVersionConfig.Other_Unit_ID; else fromunitdes = DocVersionConfig.Unit_ID; - + + DocVersionConfig.SelectedSlave = docVerSelectedSlave; //B2023-035 reset the selected Slave + // adjustments to the procedure number for applicability can be defined in 2 places: // 1) mstr below: working draft properties/Applicability/Procedure number field for each unit can have text. The '#' in this // field represents the procdure number & any text prefixing it, will be used to prefix the procedure number