Added error handling code so that procedurre set could be imported.

This commit is contained in:
Rich 2015-10-20 20:54:19 +00:00
parent 406ec0f036
commit abe3e723ea

View File

@ -422,6 +422,8 @@ namespace VEPROMS
{ {
Content c = Content.Get(pi.MyContent.ContentID); Content c = Content.Get(pi.MyContent.ContentID);
XmlDocument xd = new XmlDocument(); XmlDocument xd = new XmlDocument();
// If the config field is empty, add an empty xml node.
if (c.Config == "") c.Config = "<Config/>";
xd.LoadXml(c.Config); xd.LoadXml(c.Config);
XmlNode xn = xd.SelectSingleNode("Config/Procedure/@SectionStart"); XmlNode xn = xd.SelectSingleNode("Config/Procedure/@SectionStart");
if (xn != null) if (xn != null)