Added code to handle Table ROs.

Used generic (static) VlnFlexGrid.ROTableUpdate to determine if the table contents are updated.
Added Error Handling around the code that shuts down PROMs
Added function to ROFSTLookup to retrieve the Accessory Page ID.
Corrected code to handle value changes for Table ROs
Created generic (static) VlnFlexGrid.ROTableUpdate to determine if the table contents are updated.
This commit is contained in:
Rich
2014-03-19 15:30:26 +00:00
parent cf79d6a313
commit 0376212e09
9 changed files with 200 additions and 109 deletions

View File

@@ -591,7 +591,10 @@ namespace Volian.Controls.Library
ContentAuditInfo cai = tn.Tag as ContentAuditInfo;
if (MessageBox.Show(this, "Do you want to restore this content change?", "Confirm Content Change Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
ContentInfo ci = ContentInfo.RestoreContent(cai);
ROFstInfo myRoFst = MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
myRoFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
ContentInfo ci = ContentInfo.RestoreContent(cai,myRoFst);
myRoFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
RefreshRequired = true;
UpdateHistory();
myRTB.Clear();
@@ -609,8 +612,10 @@ namespace Volian.Controls.Library
ItemInfo ii = null;
if (iai.Level == 2)
{
ii = MyItemInfo.RestoreItem(iai);
ROFstInfo myRoFst = MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
myRoFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
ii = MyItemInfo.RestoreItem(iai,myRoFst);
myRoFst.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
//_MyEditItem.AddChild((E_FromType)fromtype, contenttype);
//ii.ItemParts[0].FromType
//ii.MyContent.Type
@@ -674,7 +679,10 @@ namespace Volian.Controls.Library
}
else
{
ii = MyItemInfo.RestoreSibling(iai);
ROFstInfo myRoFst = MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
myRoFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
ii = MyItemInfo.RestoreSibling(iai,myRoFst);
myRoFst.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
if (ii.IsStep)
ii = StepInfo.Get(ii.ItemID);
else if (ii.IsSection)
@@ -729,7 +737,10 @@ namespace Volian.Controls.Library
if (MessageBox.Show(this, "Do you want to restore this table?", "Confirm Table Restore", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Question) == DialogResult.Yes)
{
ContentAuditInfo cai = ContentAuditInfo.Get(gai.ContentAuditID);
ContentInfo ci = ContentInfo.RestoreContent(cai);
ROFstInfo myRoFst = MyItemInfo.MyDocVersion.DocVersionAssociations[0].MyROFst;
myRoFst.ROTableUpdate += new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
ContentInfo ci = ContentInfo.RestoreContent(cai,myRoFst);
myRoFst.ROTableUpdate -= new ROFstInfoROTableUpdateEvent(myRoFst_ROTableUpdate);
RefreshRequired = true;
UpdateHistory();
myRTB.Clear();
@@ -737,6 +748,11 @@ namespace Volian.Controls.Library
}
}
}
List<string> myRoFst_ROTableUpdate(object sender, ROFstInfoROTableUpdateEventArgs args)
{
return VlnFlexGrid.ROTableUpdate(sender, args);
}
private void DisplayTagRTF(TreeNode tn)
{
if (tn.Tag != null)