Changed how Loader class processes 16-bit APL files

Added ReviewDate property to ProcInfo class
Changed how RevDate and ReviewDate values obtained from 16-bit data
Added AddSlaveNode and AddSlaveItem methods to ConfigInfo class
Added validity check to verify Procedure Set Path and Process Only In Location are in synch
This commit is contained in:
Rich
2012-12-04 22:32:34 +00:00
parent 44396a7200
commit 03d49ce2df
4 changed files with 64 additions and 54 deletions

View File

@@ -80,6 +80,30 @@ namespace DataLoader
if (xmldoc != null) return xmldoc.InnerXml;
else return null;
}
public void AddSlaveNode(int index)
{
XmlElement slaves = xmldoc.SelectSingleNode("Config/Slaves") as XmlElement;
if (slaves == null)
{
slaves = xmldoc.CreateElement("Slaves");
xmldoc.DocumentElement.AppendChild(slaves);
}
XmlElement slave = xmldoc.CreateElement("Slave");
XmlAttribute xa = xmldoc.CreateAttribute("index");
xa.InnerText = index.ToString();
slave.Attributes.Append(xa);
slaves.AppendChild(slave);
}
public void AddSlaveItem(int index, string aname, string avalue)
{
string srch = "Config/Slaves/Slave[@index='" + index.ToString() + "']";
XmlElement slave = xmldoc.SelectSingleNode(srch) as XmlElement;
if (slave != null)
{
XmlAttribute xa = xmldoc.CreateAttribute(aname);
xa.InnerText = avalue;
slave.Attributes.Append(xa);
}
}
}
}