Added code to improve the results text of batch processes

This commit is contained in:
Rich 2015-02-12 03:25:06 +00:00
parent f24b475f7c
commit 5cd3f11451

View File

@ -403,7 +403,6 @@ namespace VEPROMS.CSLA.Library
if (value == "?") if (value == "?")
{ {
retval = this.ConvertROToText(rousg, value, rotype, origROFstInfo); retval = this.ConvertROToText(rousg, value, rotype, origROFstInfo);
if (retval == null) Console.WriteLine("null");
Annotation.MakeAnnotation(this.ContentItems[0].MyItem, ItemInfo.VolianCommentType, "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(retval)), null); Annotation.MakeAnnotation(this.ContentItems[0].MyItem, ItemInfo.VolianCommentType, "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(retval)), null);
RoUsage.Delete(rousg.ROUsageID); RoUsage.Delete(rousg.ROUsageID);
return retval; return retval;
@ -590,11 +589,27 @@ namespace VEPROMS.CSLA.Library
if ((gg.Contains("\\u8209?") ? gg.Replace("\\u8209?", "-") : gg) != (newvalue.Contains("\\u8209?") ? newvalue.Replace("\\u8209?", "-") : newvalue)) if ((gg.Contains("\\u8209?") ? gg.Replace("\\u8209?", "-") : gg) != (newvalue.Contains("\\u8209?") ? newvalue.Replace("\\u8209?", "-") : newvalue))
{ {
_Text = Text.Substring(0, myIndex) + newvalue + Text.Substring(myIndex + myLength); _Text = Text.Substring(0, myIndex) + newvalue + Text.Substring(myIndex + myLength);
if (newvalue == "?")
{
gg = ItemInfo.ConvertToDisplayText(gg);
newvalue = "Invalid Transition";
OnStaticContentInfoChange(ii, new StaticContentInfoEventArgs(gg, newvalue, "TX"));
break;
}
if (newvalue.StartsWith(gg) && (newvalue.ToUpper().Contains("BMP") || newvalue.ToUpper().Contains("GIF") || newvalue.ToUpper().Contains("TIF")))
{
break; // Text has been processed
}
else
{
gg = ItemInfo.ConvertToDisplayText(gg);
newvalue = ItemInfo.ConvertToDisplayText(newvalue);
OnStaticContentInfoChange(ii, new StaticContentInfoEventArgs(gg, newvalue, "TX")); OnStaticContentInfoChange(ii, new StaticContentInfoEventArgs(gg, newvalue, "TX"));
break; // Text has been processed break; // Text has been processed
} }
} }
} }
}
// see if there is a grid to update too. // see if there is a grid to update too.
if (tran.MyContent.MyGrid != null) if (tran.MyContent.MyGrid != null)
{ {
@ -704,9 +719,25 @@ namespace VEPROMS.CSLA.Library
if ((gg.Replace(@"\'b0", @"\'B0") != newvalue.Replace(@"\'b0", @"\'B0"))) if ((gg.Replace(@"\'b0", @"\'B0") != newvalue.Replace(@"\'b0", @"\'B0")))
{ {
_Text = Text.Substring(0, myIndex) + newvalue + _Text.Substring(myIndex + myLength); _Text = Text.Substring(0, myIndex) + newvalue + _Text.Substring(myIndex + myLength);
if (newvalue == "?")
{
gg = ItemInfo.ConvertToDisplayText(gg);
newvalue = "Deleted RO";
OnStaticContentInfoChange(ii, new StaticContentInfoEventArgs(gg, newvalue, "RO"));
break;
}
if (newvalue.StartsWith(gg) && (newvalue.ToUpper().Contains("BMP") || newvalue.ToUpper().Contains("GIF") || newvalue.ToUpper().Contains("TIF")))
{
break; // Text has been processed
}
else
{
gg = ItemInfo.ConvertToDisplayText(gg);
newvalue = ItemInfo.ConvertToDisplayText(newvalue);
OnStaticContentInfoChange(ii, new StaticContentInfoEventArgs(gg, newvalue, "RO")); OnStaticContentInfoChange(ii, new StaticContentInfoEventArgs(gg, newvalue, "RO"));
break; // Text has been processed break; // Text has been processed
} }
}
} }
} }
// see if there is a grid to update too. // see if there is a grid to update too.