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)); }