Fixed ROs that contain hyphens in Tables when printed.

This commit is contained in:
Rich 2014-05-22 19:30:43 +00:00
parent da6cc6ac3e
commit afd50f8c19

View File

@ -510,18 +510,18 @@ namespace VEPROMS.CSLA.Library
Match mg = Regex.Match(mmg.Value, lookForXml); Match mg = Regex.Match(mmg.Value, lookForXml);
if (mg != null && mg.Groups.Count > 1) if (mg != null && mg.Groups.Count > 1)
{ {
int myIndex = mg.Groups[4].Index + mmg.Index; int myIndex = mg.Groups[4].Index;
int myLength = mg.Groups[4].Length; int myLength = mg.Groups[4].Length;
if (mg.Groups[3].Value != " ") if (mg.Groups[3].Value != " ")
{ {
myIndex = mg.Groups[3].Index + mmg.Index; myIndex = mg.Groups[3].Index ;
myLength += mg.Groups[3].Length; myLength += mg.Groups[3].Length;
} }
string gg = MyGrid.Data.Substring(myIndex, myLength); string gg = MyGrid.Data.Substring(myIndex+ mmg.Index, myLength);
if (newvalue.Contains(@"\u8209?")) if (newvalue.Contains(@"\u8209?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(gg, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m.Groups.Count < 3)
newvalue = newvalue.Replace(@"\u8209?", "-"); newvalue = newvalue.Replace(@"\u8209?", "-");
else else
newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8209?", m.Groups[1].Value + @"\u8209?" + m.Groups[3].Value);
@ -529,7 +529,7 @@ namespace VEPROMS.CSLA.Library
if (newvalue.Contains(@"\u8593?")) if (newvalue.Contains(@"\u8593?"))
{ {
Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)"); Match m = Regex.Match(newvalue, @"(\\f[0-9]+)(\\u[0-9]{1,4}\?)(\\f[0-9]+ ?)");
if (m == null) if (m.Groups.Count < 3)
newvalue = newvalue.Replace(@"\u8593?", "^"); newvalue = newvalue.Replace(@"\u8593?", "^");
else else
newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value); newvalue = newvalue.Replace(@"\u8593?", m.Groups[1].Value + @"\u8593?" + m.Groups[3].Value);