New function to fix the ro values in the link text within the content text (for example, if the rodbid is updated in the link text)
Add menu item for ro fixer. Fix ro values correctly if containing a dash and/or in a grid
This commit is contained in:
1 parent
7530ca00f3
commit
2702cfeeed
4 files changed
+153
-5
No files matched your search
@@ -54,7 +54,17 @@ namespace VEPROMS.CSLA.Library
|
||||
if (m != null && m.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = m.Groups[3];
|
||||
if (g.ToString() != newvalue)
|
||||
System.Text.RegularExpressions.Group g2 = m.Groups[2];
|
||||
if (g2.Value.StartsWith(@"\u8209?"))
|
||||
{
|
||||
string gg = g2.Value + " " + g.Value;
|
||||
if (gg != newvalue)
|
||||
{
|
||||
Text = Text.Substring(0, offset + g2.Index) + newvalue + Text.Substring(offset + g2.Index + gg.Length);
|
||||
break; // Text has been processed
|
||||
}
|
||||
}
|
||||
else if (g.ToString() != newvalue)
|
||||
{
|
||||
Text = Text.Substring(0, offset + g.Index) + newvalue + Text.Substring(offset + g.Index + g.Length);
|
||||
break; // Text has been processed
|
||||
@@ -79,12 +89,14 @@ namespace VEPROMS.CSLA.Library
|
||||
foreach (Match mmg in msg)
|
||||
{
|
||||
int offset = 0; // crashed in substring line below if using mmg.Index; Set to 0 and it worked - KBR.
|
||||
Match mg = Regex.Match(MyGrid.Data, lookForXml);
|
||||
Match mg = Regex.Match(mmg.Value, lookForXml);// Regex.Match(MyGrid.Data, lookForXml);
|
||||
if (mg != null && mg.Groups.Count > 1)
|
||||
{
|
||||
System.Text.RegularExpressions.Group g = mg.Groups[3];
|
||||
if (g.ToString() != newvalue)
|
||||
MyGrid.Data = MyGrid.Data.Substring(0, offset + g.Index) + newvalue + MyGrid.Data.Substring(offset + g.Index + g.Length);
|
||||
{
|
||||
MyGrid.Data = MyGrid.Data.Substring(0, offset + mmg.Index + g.Index) + newvalue + MyGrid.Data.Substring(offset + mmg.Index + g.Index + g.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user