From 428cb772e54c30b9b1f9106aff8bede3bd50c83b Mon Sep 17 00:00:00 2001 From: Kathy Date: Fri, 10 Aug 2018 15:38:20 +0000 Subject: [PATCH] F2018-037: WCNSAMGBCK was printing extra section number for Purpose section and Attachment Section (see B2018-101) --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index b59c79e0..7b873da0 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -4132,11 +4132,13 @@ namespace VEPROMS.CSLA.Library // B2018-101: The section number was duplicated in the WCNOC step tab. This was fixed for edit, B2017-153, but not for print (see below). The code // used for that bug fix was duplicated here (with slight modification because the tab did not have the "WCNOC" string, thus using the active // formats, and also use tbformat rather than tbformate. + // F2018-037: An additional WCN background format was added for SAMG, so the code was made more general, i.e. to make tab + // change, check for formats that start with WCN and contain BCK: if (useLinked) { - if ((ActiveFormat.Name.ToUpper() == "WCNBCK" || ActiveFormat.Name.ToUpper() == "WCNFSGBCK" || ActiveFormat.Name.ToUpper() == "WCNOFBCK") && tbformat.Contains(LinkedTab[0].ToString() + "{numeric}")) + if (ActiveFormat.Name.ToUpper().StartsWith("WCN") && ActiveFormat.Name.ToUpper().Contains("BCK") && tbformat.Contains(LinkedTab[0].ToString() + "{numeric}")) tbformat = tbformat.Replace(LinkedTab[0].ToString() + "{numeric}", "{numeric}"); - else if ((ActiveFormat.Name.ToUpper() == "WCNBCK" || ActiveFormat.Name.ToUpper() == "WCNFSGBCK" || ActiveFormat.Name.ToUpper() == "WCNOFBCK") && tbformat.Contains(LinkedTab[0].ToString() + ".{numeric}")) + else if ((ActiveFormat.Name.ToUpper().StartsWith("WCN") && ActiveFormat.Name.ToUpper().Contains("BCK")) && tbformat.Contains(LinkedTab[0].ToString() + ".{numeric}")) tbformat = tbformat.Replace(LinkedTab[0].ToString() + ".{numeric}", "{numeric}"); tbformat = tbformat.Replace("{numeric}", LinkedTab.Trim(" .".ToCharArray()).PadLeft(2)); }