From f459efa513504e1e3c508c501f0c7b5be1ab18c0 Mon Sep 17 00:00:00 2001 From: Rich Date: Fri, 26 Jul 2013 16:15:34 +0000 Subject: [PATCH] Enhanced Background - Simplified handling of Enhanced Background Document. {LNK Step Num} is converted to the current step number. {LNK C/N Num} is converted to the Ordinal of the current Caution or Note. This approach will work for Background Documents, but will not work for Deviation Documents since the internal Links for Background match one for one with the Background structure. This is not the case with Deviation Documents since they have to account for deleted and added steps. --- PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs index 1b5fb604..9f1ec453 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ItemExt.cs @@ -2428,6 +2428,17 @@ namespace VEPROMS.CSLA.Library tbformat = FormatStepData.TabData.IdentEdit; if (ActiveFormat.Name.ToUpper() == "WCNCKL" && FormatStepData.StepLayoutData.AlignWithParentTab) tbformat = tbformat.TrimStart(" ".ToCharArray()); } + if ((ActiveFormat.PlantFormat.FormatData.PurchaseOptions.Value & E_PurchaseOptions.EnhancedBackgrounds) == E_PurchaseOptions.EnhancedBackgrounds) + { + if (tbformat.Contains("{LNK C/N Num}")) + { + tbformat = tbformat.Replace("{LNK C/N Num}", Ordinal.ToString() + ":"); + tbformat = tbformat.Replace("{LNK Step Num}", ""); //(ActiveParent as ItemInfo).Ordinal.ToString() + ":"); + tbformat = tbformat.TrimStart(" ".ToCharArray()); + } + if (tbformat.Contains("{LNK Step Num}")) + tbformat = tbformat.Replace("{LNK Step Num}", "STEP " + Ordinal.ToString() + ":"); + } // rno gets parent tab if (IsRNOPart && FormatStepData.NumberSubs) {