B2024-025 Older Parent/Child procedure sets use applicability tokens that do not include the “U-“ prefix.

This commit is contained in:
2024-05-06 13:49:03 -04:00
parent 89814777b4
commit c865b67398
5 changed files with 79 additions and 40 deletions

View File

@@ -468,10 +468,12 @@ namespace VEPROMS.CSLA.Library
return text;
}
// B2022-035: resolve unit specific designators - moved code to here so that other objects can use it
// B2024-025 added <ID> to the replace list
public static string ResolveUnitSpecific(DocVersionInfo mydocversion, string text)
{
if (mydocversion == null) return text;
text = Regex.Replace(text, @"\<U\>", mydocversion.DocVersionConfig.Unit_Number, RegexOptions.IgnoreCase);
text = Regex.Replace(text, @"\<ID\>", mydocversion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)ID)\>", mydocversion.DocVersionConfig.Unit_ID, RegexOptions.IgnoreCase);
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)NAME)\>", mydocversion.DocVersionConfig.Unit_Name, RegexOptions.IgnoreCase);
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)TEXT)\>", mydocversion.DocVersionConfig.Unit_Text, RegexOptions.IgnoreCase);