B2022-023 added logic to process <U-Other > tokens that have a space after “Other”
This commit is contained in:
parent
ba7f0faea8
commit
9098c58ea8
@ -310,10 +310,11 @@ namespace VEPROMS.CSLA.Library
|
||||
else if (val.ToUpper() == "<U-NAME>") val = MyDocVersionInfo.DocVersionConfig.Unit_Name;
|
||||
else if (val.ToUpper() == "<U-ID>") val = MyDocVersionInfo.DocVersionConfig.Unit_ID;
|
||||
// B2021-145: For applicability, the tree view & pdf file name are not getting resolved when using any of the ‘OTHER’ tokens
|
||||
else if (val.ToUpper() == "<U-OTHERTEXT>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_Text;
|
||||
else if (val.ToUpper() == "<U-OTHERNUMBER>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_Number;
|
||||
else if (val.ToUpper() == "<U-OTHERNAME>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_Name;
|
||||
else if (val.ToUpper() == "<U-OTHERID>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_ID;
|
||||
// B2022-023 also check for other followed by a space
|
||||
else if (val.ToUpper() == "<U-OTHERTEXT>" || val.ToUpper() == "<U-OTHER TEXT>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_Text;
|
||||
else if (val.ToUpper() == "<U-OTHERNUMBER>" || val.ToUpper() == "<U-OTHER NUMBER>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_Number;
|
||||
else if (val.ToUpper() == "<U-OTHERNAME>" || val.ToUpper() == "<U-OTHER NAME>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_Name;
|
||||
else if (val.ToUpper() == "<U-OTHERID>" || val.ToUpper() == "<U-OTHER ID>") val = MyDocVersionInfo.DocVersionConfig.Other_Unit_ID;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
@ -328,7 +329,7 @@ namespace VEPROMS.CSLA.Library
|
||||
//string childName = MyDocVersionInfo.DocVersionConfig.Unit_Name;
|
||||
MatchCollection mm = Regex.Matches(roval, "(<APL [^<]+) /APL>"); // B2022-020 remove a un-needed question mark that was in the search criteria
|
||||
if (mm.Count == 0) // B2022-020 will now write in error log if there is a problem
|
||||
_MyLog.WarnFormat("Parent/Child Values not parable for <APL ... /APL>\r\nItemId={0}\r\nROValue={1} ",MyDocVersionInfo.ItemID,roval);
|
||||
_MyLog.WarnFormat("Parent/Child Values not parsable for <APL ... /APL>\r\nItemId={0}\r\nROValue={1} ",MyDocVersionInfo.ItemID,roval);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
int lastIndex = 0;
|
||||
// Get selected child Idx
|
||||
|
@ -374,6 +374,11 @@ namespace VEPROMS.CSLA.Library
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERNAME)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERTEXT)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHERNUMBER)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Number, RegexOptions.IgnoreCase);
|
||||
//B2022-023 also check for other followed by a space
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER ID)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_ID, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NAME)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Name, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER TEXT)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Text, RegexOptions.IgnoreCase);
|
||||
text = Regex.Replace(text, @"\<(U(-|\\u8209\?)OTHER NUMBER)\>", _MyItemInfo.MyDocVersion.DocVersionConfig.Other_Unit_Number, RegexOptions.IgnoreCase);
|
||||
//text = DoSearchAndReplace(text, "<U-ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ID);
|
||||
text = text.Replace(@"<S\u8209?ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID);
|
||||
//text = text.Replace("<U>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
|
@ -430,13 +430,14 @@ namespace VEPROMS.CSLA.Library
|
||||
else if (unitdes == "TEXT")
|
||||
fromunitdes = DocVersionConfig.Unit_Text;
|
||||
// B2021-145: For applicability, the tree view & pdf file name are not getting resolved when using any of the ‘OTHER’ tokens
|
||||
else if (unitdes == "OTHERTEXT")
|
||||
// B2022-023 also check for other followed by a space
|
||||
else if (unitdes == "OTHERTEXT" || unitdes == "OTHER TEXT")
|
||||
fromunitdes = DocVersionConfig.Other_Unit_Text;
|
||||
else if (unitdes == "OTHERNUMBER")
|
||||
else if (unitdes == "OTHERNUMBER" || unitdes == "OTHER NUMBER")
|
||||
fromunitdes = DocVersionConfig.Other_Unit_Number;
|
||||
else if (unitdes == "OTHERNAME")
|
||||
else if (unitdes == "OTHERNAME" || unitdes == "OTHER NAME")
|
||||
fromunitdes = DocVersionConfig.Other_Unit_Name;
|
||||
else if (unitdes == "OTHERID")
|
||||
else if (unitdes == "OTHERID" || unitdes == "OTHER ID")
|
||||
fromunitdes = DocVersionConfig.Other_Unit_ID;
|
||||
else
|
||||
fromunitdes = DocVersionConfig.Unit_ID;
|
||||
|
@ -1005,10 +1005,11 @@ namespace VEPROMS.CSLA.Library
|
||||
else if (sel.Text.ToUpper() == "<U-NAME>") val = lookup.MyDocVersionInfo.DocVersionConfig.Unit_Name;
|
||||
else if (sel.Text.ToUpper() == "<U-ID>") val = lookup.MyDocVersionInfo.DocVersionConfig.Unit_ID;
|
||||
// B2021-145: For applicability, the tree view & pdf file name are not getting resolved when using any of the ‘OTHER’ tokens
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERTEXT>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_Text;
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERNUMBER>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_Number;
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERNAME>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_Name;
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERID>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_ID;
|
||||
// B2022-023 also check for other followed by a space
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERTEXT>" || sel.Text.ToUpper() == "<U-OTHER TEXT>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_Text;
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERNUMBER>" || sel.Text.ToUpper() == "<U-OTHER NUMBER>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_Number;
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERNAME>" || sel.Text.ToUpper() == "<U-OTHER NAME>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_Name;
|
||||
else if (sel.Text.ToUpper() == "<U-OTHERID>" || sel.Text.ToUpper() == "<U-OTHER ID>") val = lookup.MyDocVersionInfo.DocVersionConfig.Other_Unit_ID;
|
||||
//val = "<U-ID>",MyDocVersion.DocVersionConfig.Unit_ID);
|
||||
//text = text.Replace(@"<S\u8209?ID>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_ProcedureSetID);
|
||||
//text = text.Replace("<U>", _MyItemInfo.MyDocVersion.DocVersionConfig.Unit_Number);
|
||||
|
Loading…
x
Reference in New Issue
Block a user