From bcb8f419ee8a36666265e3dcd8ab5083d49c8d8d Mon Sep 17 00:00:00 2001 From: mschill Date: Mon, 18 Nov 2024 16:17:07 -0500 Subject: [PATCH] B2024-003_ B2023-113 Updating RO Values inside a text Grid, adding a caret and/or dash into the RO value and then updating RO values changed to question marks in the UI. This also fixes restoring a deleted RO table column that has a hyphen in it. --- .../Extension/ContentExt.cs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs index 07e23237..6194565b 100644 --- a/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs +++ b/PROMS/VEPROMS.CSLA.Library/Extension/ContentExt.cs @@ -687,19 +687,35 @@ namespace VEPROMS.CSLA.Library myLength += mg.Groups[3].Length; } string gg = MyGrid.Data.Substring(myIndex, myLength); + //CSM B2024-003 Updating RO Values inside a text Grid, adding a karat + // and/or dash into the RO value changes to question marks in the UI, if (newvalue.Contains(@"\u8209?")) { Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); if (m == null) newvalue = newvalue.Replace(@"\u8209?", "-"); + else if (m.Groups[1].Value == "") + newvalue = newvalue.Replace(@"\u8209?", @"\f1\u8209?\f0 "); else newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); } + if (newvalue.Contains(@"\u916?")) + { + Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); + if (m == null) + newvalue = newvalue.Replace(@"\u916?", "^"); + else if (m.Groups[1].Value == "") + newvalue = newvalue.Replace(@"\u916?", @"\f1\u916?\f0 "); + else + newvalue = newvalue.Replace(@"\u916?", m.Groups[1].Value + @"\u916?" + m.Groups[3].Value); + } if (newvalue.Contains(@"\u8593?")) { Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); if (m == null) newvalue = newvalue.Replace(@"\u8593?", "^"); + else if (m.Groups[1].Value == "") + newvalue = newvalue.Replace(@"\u8593?", @"\f1\u8593?\f0 "); else newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value); } @@ -708,6 +724,8 @@ namespace VEPROMS.CSLA.Library Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); if (m == null) newvalue = newvalue.Replace(@"\u9586?", @"\\"); + else if (m.Groups[1].Value == "") + newvalue = newvalue.Replace(@"\u9586?", @"\f1\u9586?\f0 "); else newvalue = newvalue.Replace(@"\u9586?", m.Groups[1].Value + @"\u9586?" + m.Groups[3].Value); } -- 2.47.2