Compare commits

..
10 Commits
27 changed files with 30 additions and 20 deletions

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.
+20 -10
View File
@@ -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)
+10 -10
View File
@@ -29,9 +29,9 @@ namespace Volian.Controls.Library
public DisplayLibDocs() public DisplayLibDocs()
{ {
InitializeComponent(); InitializeComponent();
btnOpenLibDoc.Enabled = false; btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = false;
btnDelLibDoc.Enabled = false; btnDelLibDoc.Visible = btnDelLibDoc.Enabled = false;
btnPrint.Enabled = listBoxLibDocs.Items.Count > 0; btnPrint.Enabled = listBoxLibDocs.Items.Count > 0;
saveGroupPanelUsages = groupPanelUsages.Style.BackColor; saveGroupPanelUsages = groupPanelUsages.Style.BackColor;
} }
DisplayTabControl _DisplayTabControl; DisplayTabControl _DisplayTabControl;
@@ -107,14 +107,14 @@ namespace Volian.Controls.Library
groupPanelUsages.Style.BackColor = dicnt.LibraryDocumentUsageList == null || dicnt.LibraryDocumentUsageList.Count == 0 ? this.saveGroupPanelUsages : Color.LightGreen; groupPanelUsages.Style.BackColor = dicnt.LibraryDocumentUsageList == null || dicnt.LibraryDocumentUsageList.Count == 0 ? this.saveGroupPanelUsages : Color.LightGreen;
if (iil == null) if (iil == null)
{ {
btnDelLibDoc.Enabled = true; btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = true;
btnOpenLibDoc.Enabled = true; btnDelLibDoc.Visible = btnDelLibDoc.Enabled = true;
return; return;
} }
// Put the usages in the usage list for the selected library document. // Put the usages in the usage list for the selected library document.
btnDelLibDoc.Enabled = false; btnOpenLibDoc.Visible = btnOpenLibDoc.Enabled = false;
btnOpenLibDoc.Enabled = false; btnDelLibDoc.Visible = btnDelLibDoc.Enabled = false;
foreach (ItemInfo ii in dicnt.LibraryDocumentUsageList) foreach (ItemInfo ii in dicnt.LibraryDocumentUsageList)
{ {
if (ii.MyDocVersion != null) if (ii.MyDocVersion != null)
listBoxUsages.Items.Add($"{ii.MyProcedure} - {ii.DisplayNumber} {ii.DisplayText}"); listBoxUsages.Items.Add($"{ii.MyProcedure} - {ii.DisplayNumber} {ii.DisplayText}");