Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9c9e12ff57 | ||
|
|
b188a3af99 | ||
|
|
a8033f3e51 | ||
|
|
2e3ef1e86f | ||
|
|
e0614051f8 | ||
|
|
7da1f86c86 | ||
|
|
f5f9975363 |
No files matched your search
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -128,17 +128,27 @@ namespace VEPROMS.CSLA.Library
|
|||||||
int sibCount = SiblingCount(xmlNode);
|
int sibCount = SiblingCount(xmlNode);
|
||||||
return string.Format("{0}/{1}[{2}]", parentPath, xmlNode.Name, sibCount);
|
return string.Format("{0}/{1}[{2}]", parentPath, xmlNode.Name, sibCount);
|
||||||
}
|
}
|
||||||
public static XmlNode InheritLookup(XmlNode xmlNode, string path, bool stepLookup)
|
//B2026-077 – Update Format inheritance to use index id instead of position/order.
|
||||||
|
public static string PathByIndex(XmlNode xmlNode)
|
||||||
|
{
|
||||||
|
if (xmlNode.Name == "TransTypes" || xmlNode.Name == "Step")
|
||||||
|
{
|
||||||
|
string parentPath = xmlNode.ParentNode == xmlNode.OwnerDocument ? "" : Path(xmlNode.ParentNode);
|
||||||
|
string Indx = xmlNode.Attributes["Index"].Value;
|
||||||
|
return $@"{parentPath}/{xmlNode.Name}[@Index='{Indx}']";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Path(xmlNode);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public static XmlNode InheritLookup(XmlNode xmlNode, string path, bool stepLookup)
|
||||||
{
|
{
|
||||||
//stepLookup = false; // 8/2 change for inheritance
|
//stepLookup = false; // 8/2 change for inheritance
|
||||||
if (xmlNode == null) return null;// No path to match
|
if (xmlNode == null) return null;// No path to match
|
||||||
string xPath = Path(xmlNode);// Build xPath from xmlNode
|
string xPath = PathByIndex(xmlNode);// Build xPath from xmlNode
|
||||||
if (xmlNode.Name == "TransTypes")
|
|
||||||
{
|
vlnFormatDocument fd = (vlnFormatDocument)xmlNode.OwnerDocument;//First Get the vlnFormatDocument - This also ties it to a FormatInfo object
|
||||||
string TransIndex = xmlNode.Attributes["Index"].Value;
|
|
||||||
xPath = System.Text.RegularExpressions.Regex.Replace(xPath, @"\[[0-9]*\]$", @"[@Index='" + TransIndex + @"']");
|
|
||||||
}
|
|
||||||
vlnFormatDocument fd = (vlnFormatDocument)xmlNode.OwnerDocument;//First Get the vlnFormatDocument - This also ties it to a FormatInfo object
|
|
||||||
while(fd.MyFormat.MyIParent != null)
|
while(fd.MyFormat.MyIParent != null)
|
||||||
{
|
{
|
||||||
fd = fd.MyFormat.MyIParent.PlantFormat.XmlDoc;// Get the parents vlnFormatDocument
|
fd = fd.MyFormat.MyIParent.PlantFormat.XmlDoc;// Get the parents vlnFormatDocument
|
||||||
@@ -167,14 +177,14 @@ namespace VEPROMS.CSLA.Library
|
|||||||
{
|
{
|
||||||
if (xmlNode == null) return null;// No path to match
|
if (xmlNode == null) return null;// No path to match
|
||||||
string xPath = Path(xmlNode);// Build xPath from xmlNode
|
string xPath = Path(xmlNode);// Build xPath from xmlNode
|
||||||
vlnFormatDocument fd = (vlnFormatDocument)xmlNode.OwnerDocument;//First Get the vlnFormatDocument - This also ties it to a FormatInfo object
|
vlnFormatDocument fd = (vlnFormatDocument)xmlNode.OwnerDocument;//First Get the vlnFormatDocument - This also ties it to a FormatInfo object
|
||||||
while (fd.MyFormat.MyIParent != null)
|
while (fd.MyFormat.MyIParent != null)
|
||||||
{
|
{
|
||||||
fd = fd.MyFormat.MyIParent.PlantFormat.XmlDoc;// Get the parents vlnFormatDocument
|
fd = fd.MyFormat.MyIParent.PlantFormat.XmlDoc;// Get the parents vlnFormatDocument
|
||||||
if (fd != null)
|
if (fd != null)
|
||||||
{
|
{
|
||||||
XmlNode xp = fd.SelectSingleNode(xPath);// Get the related node
|
XmlNode xp = fd.SelectSingleNode(xPath);// Get the related node
|
||||||
if (xp != null)
|
if (xp != null)
|
||||||
{
|
{
|
||||||
XmlNodeList xl = xp.SelectNodes(path);
|
XmlNodeList xl = xp.SelectNodes(path);
|
||||||
if (xl != null && xl.Count > 0)
|
if (xl != null && xl.Count > 0)
|
||||||
|
|||||||
Reference in new issue
Block a user