B2017-069 – remove enhanced document information from the config when a step is restored from history
Added a null check
This commit is contained in:
parent
8f81199574
commit
de0e7d3613
@ -7,6 +7,7 @@ using Csla.Validation;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@ -1629,6 +1630,22 @@ namespace VEPROMS.CSLA.Library
|
||||
ContentInfo.Refresh(cctmp);
|
||||
}
|
||||
}
|
||||
// B2017-069 when we restore a step the once had enhanced document links,
|
||||
// remove the enhanced document link information - fixes delete/restore issue of linked steps.
|
||||
XmlDocument xd = new XmlDocument();
|
||||
xd.LoadXml(tmp.MyContent.Config);
|
||||
XmlNode xn = xd.DocumentElement.SelectSingleNode("Enhanced");
|
||||
if (xn != null)
|
||||
{
|
||||
xn.ParentNode.RemoveChild(xn);
|
||||
string config = xd.OuterXml;
|
||||
using (Content ctmp = tmp.MyContent.Get())
|
||||
{
|
||||
ctmp.Config = config;
|
||||
ctmp.Save();
|
||||
ContentInfo.Refresh(ctmp);
|
||||
}
|
||||
}
|
||||
return tmp;
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -462,7 +462,8 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
ItemInfo ii = ItemInfo.Get(ed.ItemID);
|
||||
//if (MyStepPanel.MyStepTabPanel.MyDisplayTabControl.IsItemInfoProcedureOpen(ii))
|
||||
MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OnRefreshEnhancedDocument(new ItemSelectedChangedEventArgs(ii));
|
||||
if (ii != null)
|
||||
MyStepPanel.MyStepTabPanel.MyDisplayTabControl.OnRefreshEnhancedDocument(new ItemSelectedChangedEventArgs(ii));
|
||||
if (dti != null)
|
||||
dti.MyStepTabPanel.MyDisplayTabControl.OpenItem(this.MyItemInfo);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user