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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user