B2020-125: View of Consistency check report displaying error message and crashing

This commit is contained in:
2020-09-22 16:21:02 +00:00
parent c762960ddd
commit 59cb56ca88
2 changed files with 21 additions and 4 deletions

View File

@@ -470,7 +470,17 @@ namespace VEPROMS.CSLA.Library
rochild roc = GetRoChild12(ROID);
if (roc.value == null)
roc = GetRoChild(ROID);
sb.Append(roc.title.Replace(roc.appid,"").Replace(roc.value,"").Trim());
// B2020-125: View of Consistency check report displaying error message and crashing. And also in 'else' check for null
if (roc.ID == -1)
sb.Append("Could not find RO data");
else
{
string tmp = roc.title;
if (tmp == null) tmp = "";
if (roc.appid != null) tmp = tmp.Replace(roc.appid, "");
if (roc.value != null) tmp = tmp.Replace(roc.value, "");
sb.Append(tmp.Trim());
}
do
{
string parent = ROID.Substring(0, 4) + string.Format("{0:X8}", roc.ParentID);