From 7a686438373d8f374ba65921a3f8fe036c7fe4d0 Mon Sep 17 00:00:00 2001 From: John Date: Tue, 11 Jan 2022 16:18:25 +0000 Subject: [PATCH] B2022-007 added while loop to process more than on value --- PROMS/Volian.Print.Library/VlnSvgPageHelper.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs index acb8ebc3..c9eac1d2 100644 --- a/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs +++ b/PROMS/Volian.Print.Library/VlnSvgPageHelper.cs @@ -2332,13 +2332,15 @@ i = 0; // F2021-034: Resolve applicability unit tokens (not just '') private string ResolveUnitApp(DocVersionInfo dvi, string str) { + if (dvi == null) return str; string tmp = str.ToUpper(); int sindx = tmp.IndexOf("", sindx + 1); - string reptmp = str.Substring(sindx, eindx - sindx+1); - tmp = reptmp.ToUpper(); - if (reptmp != "" && dvi != null) + string reptmp; + while (sindx > -1 && eindx > -1) // B2022-007 added while loop to process more than one ") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Number); else if (tmp == "") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Text); else if (tmp == "") str = str.Replace(reptmp, dvi.DocVersionConfig.Unit_Number); @@ -2349,6 +2351,10 @@ i = 0; else if (tmp == "") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Number); else if (tmp == "") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_Name); else if (tmp == "") str = str.Replace(reptmp, dvi.DocVersionConfig.Other_Unit_ID); + else str = str.Replace(reptmp, tmp.Replace("<", "*?").Replace(">", "?*")); + tmp = str.ToUpper(); + sindx = tmp.IndexOf("", sindx + 1); } return str; }