Added logic to return the previous RO Value from FixContentText if the value is updated.

This commit is contained in:
Rich 2014-03-15 10:03:31 +00:00
parent 0231bdc4ca
commit 5188334ea9

View File

@ -41,8 +41,9 @@ namespace VEPROMS.CSLA.Library
}
}
}
public void FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo) // string newvalue)
public string FixContentText(RoUsageInfo rousg, string value, int rotype, ROFstInfo origROFstInfo) // string newvalue)
{
string retval = null;
string newvalue = value;
string findLink = @"<START\].*?\[END>";
MatchCollection ms = Regex.Matches(Text, findLink);
@ -60,12 +61,14 @@ namespace VEPROMS.CSLA.Library
string gg = g2.Value + " " + g.Value;
if (gg != newvalue)
{
retval = gg;
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)
{
retval = g.Value;
Text = Text.Substring(0, offset + g.Index) + newvalue + Text.Substring(offset + g.Index + g.Length);
break; // Text has been processed
}
@ -95,12 +98,14 @@ namespace VEPROMS.CSLA.Library
System.Text.RegularExpressions.Group g = mg.Groups[3];
if (g.ToString() != newvalue)
{
retval = g.Value;
MyGrid.Data = MyGrid.Data.Substring(0, offset + mmg.Index + g.Index) + newvalue + MyGrid.Data.Substring(offset + mmg.Index + g.Index + g.Length);
}
}
}
}
}
return retval;
}
}
public partial class ContentInfo