Strip Enhanced data when importing an Enhanced procedure. The enhanced data will not properly align, so it should be removed.
This commit is contained in:
parent
09b87d183e
commit
81661c1fb9
@ -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,6 +3074,7 @@ 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;
|
||||
config = StripEnhanced(config);
|
||||
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||
CheckForFloatingFoldout(contentid, config);
|
||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||
@ -3160,6 +3163,7 @@ 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;
|
||||
config = StripEnhanced(config);
|
||||
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||
CheckForFloatingFoldout(contentid, config);
|
||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||
@ -3247,6 +3251,7 @@ 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;
|
||||
config = StripEnhanced(config);
|
||||
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||
CheckForFloatingFoldout(contentid, config);
|
||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||
@ -3334,6 +3339,7 @@ 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;
|
||||
config = StripEnhanced(config);
|
||||
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||
CheckForFloatingFoldout(contentid, config);
|
||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||
@ -3421,6 +3427,7 @@ 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;
|
||||
config = StripEnhanced(config);
|
||||
int contentid = int.Parse(xc.Attributes.GetNamedItem("contentid").InnerText);
|
||||
CheckForFloatingFoldout(contentid, config);
|
||||
string userid = xc.Attributes.GetNamedItem("userid").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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user