B2026-022-Adding-RO-Editor-symbols-to-RO-Tables

This commit is contained in:
2026-03-11 20:26:01 -04:00
parent 331de6ecfe
commit 7636fe7686
3 changed files with 50 additions and 4 deletions

View File

@@ -419,6 +419,7 @@ namespace ROEditor
System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
// The data path the was passed in.
PassedInPath = @"V:\Active Project Files\Farley PROMS Delivery\2022\RO";
DbConnectPath = PassedInPath;
// Setup the context menu

View File

@@ -2142,7 +2142,21 @@ namespace RODBInterface
wraccid = accid;
string dt = string.Format("{0:yyyyMMddHHmmss}", System.DateTime.Now);
string xmlstr = GenerateXmlString(ro, false);
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstr + "'";
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
xmlstrTmp.Append($"\\u{(int)chr}?");
}
else
{
xmlstrTmp.Append((char)chr);
}
}
string strUpdate = "UPDATE " + ro.GetAttribute("Table") + " SET Info = '" + xmlstrTmp.ToString() + "'";
if (movedRO)
{
VlnXmlElement parent = (VlnXmlElement)ro.ParentNode;
@@ -2186,6 +2200,21 @@ namespace RODBInterface
}
string xmlstr = GenerateXmlString(ro, false);
StringBuilder xmlstrTmp = new StringBuilder(); // B2026-025 prep the info field data so it will be saved correctly.
char[] chrAry = xmlstr.ToCharArray();
foreach (int chr in chrAry)
{
if (chr > 166)
{
xmlstrTmp.Append($"\\u{(int)chr}?");
}
else
{
xmlstrTmp.Append((char)chr);
}
}
string wraccid = null;
if (ro.HasAttribute("AccPageID"))
{
@@ -2209,13 +2238,13 @@ namespace RODBInterface
// strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageID, ModDateTime, Info ) ";
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, AccPageID, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
}
else
{
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, ModDateTime, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.Group + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
}
}
@@ -2223,7 +2252,7 @@ namespace RODBInterface
{
strInsert = "INSERT INTO " + parent.GetAttribute("Table") + "( RecID, RecType, ParentID, AccPageId, ModDateTime, Info ) ";
strInsert = strInsert + " VALUES ('" + ro.GetAttribute("RecID") + "'," + (uint)RecordType.RRO + ",'" + ro.GetAttribute("ParentID");
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstr + "');";
strInsert = strInsert + "','" + wraccid + "','" + dt + "','" + xmlstrTmp.ToString() + "');";
}
try