diff --git a/PROMS/VEPROMS User Interface/dlgExportImport.cs b/PROMS/VEPROMS User Interface/dlgExportImport.cs index 4a2f9bea..fabb1e37 100644 --- a/PROMS/VEPROMS User Interface/dlgExportImport.cs +++ b/PROMS/VEPROMS User Interface/dlgExportImport.cs @@ -2697,6 +2697,7 @@ namespace VEPROMS int versiontype = int.Parse(xe.Attributes.GetNamedItem("versiontype").InnerText); string name = xe.Attributes.GetNamedItem("name").InnerText; string config = xe.Attributes.GetNamedItem("config").InnerText; + config = StripEnhanced(config); string userid = xe.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xe.Attributes.GetNamedItem("dts").InnerText); string formatid = xe.Attributes.GetNamedItem("formatid").InnerText; @@ -2869,6 +2870,7 @@ namespace VEPROMS int proctype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText); string formatid = xc.Attributes.GetNamedItem("formatid").InnerText; string config = xc.Attributes.GetNamedItem("config").InnerText; + config = StripEnhanced(config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); Procedure p = Procedure.MakeProcedure(dvInfo, procInfo, number, text, proctype); @@ -3072,7 +3074,8 @@ namespace VEPROMS int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText); string formatid = xc.Attributes.GetNamedItem("formatid").InnerText; string config = xc.Attributes.GetNamedItem("config").InnerText; - int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); + config = StripEnhanced(config); + int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); CheckForFloatingFoldout(contentid, config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); @@ -3160,7 +3163,8 @@ namespace VEPROMS int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText); string formatid = xc.Attributes.GetNamedItem("formatid").InnerText; string config = xc.Attributes.GetNamedItem("config").InnerText; - int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); + config = StripEnhanced(config); + int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); CheckForFloatingFoldout(contentid, config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); @@ -3247,7 +3251,8 @@ namespace VEPROMS int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText); string formatid = xc.Attributes.GetNamedItem("formatid").InnerText; string config = xc.Attributes.GetNamedItem("config").InnerText; - int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); + config = StripEnhanced(config); + int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); CheckForFloatingFoldout(contentid, config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); @@ -3334,7 +3339,8 @@ namespace VEPROMS int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText); string formatid = xc.Attributes.GetNamedItem("formatid").InnerText; string config = xc.Attributes.GetNamedItem("config").InnerText; - int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); + config = StripEnhanced(config); + int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); CheckForFloatingFoldout(contentid, config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); @@ -3421,7 +3427,8 @@ namespace VEPROMS int steptype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText); string formatid = xc.Attributes.GetNamedItem("formatid").InnerText; string config = xc.Attributes.GetNamedItem("config").InnerText; - int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); + config = StripEnhanced(config); + int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); CheckForFloatingFoldout(contentid, config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText); @@ -3514,6 +3521,7 @@ namespace VEPROMS int sectiontype = int.Parse(xc.Attributes.GetNamedItem("type").InnerText); string formatid = xc.Attributes.GetNamedItem("formatid").InnerText; string config = xc.Attributes.GetNamedItem("config").InnerText; + config = StripEnhanced(config); int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText); CheckForFloatingFoldout(contentid, config); string userid = xc.Attributes.GetNamedItem("userid").InnerText; @@ -3547,7 +3555,19 @@ namespace VEPROMS AddParts(xc, prevInfo); return prevInfo; } - + private string StripEnhanced(string config) + { + if (config.Length > 0) + { + XmlDocument xd = new XmlDocument(); + xd.LoadXml(config); + XmlNodeList nl = xd.DocumentElement.SelectNodes("//Enhanced"); + foreach (XmlNode nd in nl) + nd.ParentNode.RemoveChild(nd); + return xd.OuterXml; + } + return config; + } private void CheckForFloatingFoldout(int contentid, string config) { if (config != string.Empty)