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.

This commit is contained in:
Matthew Schill 2024-11-18 16:17:07 -05:00
parent 059c399240
commit bcb8f419ee

View File

@ -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);
}