Fixed issues with Transitions and ROs when importing procedures and sets. Notifies user when Transitions and/or ROs are converted to text. Added message box for when an export is complete as well as when an import is complete

When a Transition or RO is converted to text, a “Link Convert To Text” annotation type is created instead of a “Verification Required” annotation
When a RO is converted to text, a “Link Convert To Text” annotation type is created instead of a “Verification Required” annotation
Fixed an invalid index issue
This commit is contained in:
2017-01-04 16:50:00 +00:00
parent eec322b4b0
commit afe6c695d9
4 changed files with 152 additions and 49 deletions

View File

@@ -75,7 +75,8 @@ namespace VEPROMS.CSLA.Library
//Text = Text.Substring(0, myIndex - 14) + gg + Text.Substring(myIndex + myLength);
using (Item myitem = this.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
{
Annotation.MakeAnnotation(myitem, AnnotationType.GetByName("Verification Required"), "", string.Format("Transition ({0}) converted to text", ItemInfo.ConvertToDisplayText(gg)), null);
// B2016-225 (follow through) added more descriptive Annotation Type when transition is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("Transition ({0}) converted to text", ItemInfo.ConvertToDisplayText(gg)), null);
}
if(tran != null)
Transition.Delete(tran.TransitionID);
@@ -539,7 +540,8 @@ namespace VEPROMS.CSLA.Library
retval = this.ConvertROToText(rousg, value, rotype, origROFstInfo);
using (Item myitem = this.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
{
Annotation.MakeAnnotation(myitem, AnnotationType.GetByName("Verification Required"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(retval)), null);
// B2016-225 (follow through) added more descriptive Annotation Type when RO is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(retval)), null);
}
RoUsage.Delete(rousg.ROUsageID);
return retval;

View File

@@ -753,7 +753,8 @@ namespace VEPROMS.CSLA.Library
oldText = content.ConvertROToText(rousage, roval, roch.type, rofstinfo);
using (Item myitem = content.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
{
Annotation.MakeAnnotation(myitem, AnnotationType.GetByName("Verification Required"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
// B2016-225 (follow through) added more descriptive Annotation Type when RO is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
}
}
else
@@ -794,7 +795,8 @@ namespace VEPROMS.CSLA.Library
oldText = content.ConvertROToText(rousage, roval, roch.type, rofstinfo);
using (Item myitem = content.ContentItems[0].MyItem) // so that myitem does not stay in cache B2016-153
{
Annotation.MakeAnnotation(myitem, AnnotationType.GetByName("Verification Required"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
// B2016-225 (follow through) added more descriptive Annotation Type when RO is converted to text
Annotation.MakeAnnotation(myitem, AnnotationType.GetByNameOrCreate("Link Converted To Text"), "", string.Format("RO value ({0}) converted to text", ItemInfo.ConvertToDisplayText(oldText)), null);
}
}
else

View File

@@ -837,7 +837,7 @@ namespace VEPROMS.CSLA.Library
tb._FormatData = formatInfo.PlantFormat.FormatData;
// get the format of the transition string based on this transition's index into the TransData part of
// format....
if (tranType > tb._FormatData.TransData.TransTypeList.MaxIndex)
if (tranType >= tb._FormatData.TransData.TransTypeList.MaxIndex) // found during fixing of B2016-176 B2016-197 fixes invalid index error during import of procedure
tranType = 0;
// Replace 3 tokens ", {.}, {.}, {.}" with a single token "{.}"
tb._TransFormat = tb._FormatData.TransData.TransTypeList[tranType].TransFormat.Replace(", {.}, {.}, {.}", "{.}");