//private void RecursiveNode(XmlNode node, WordLib wl) private void RecursiveNode(XmlNode node, RTFLib wl, string nomefile) { if (node.ChildNodes.Count == 1 || node.Attributes["Tipologia"].Value == "Nodo Multiplo") { if (RecursiveCheck(node)) { wl.Add(node, IDCliente, IDTree, IDSessione, nomefile); } } else { if (node.ParentNode.Name == "Tree" || RecursiveCheck(node)) { if (node.ParentNode.Name != "Tree") { wl.AddTitle(node.Attributes["Codice"].Value + " " + node.Attributes["Titolo"].Value, true); } foreach (XmlNode item in node.ChildNodes) { if (item.Name == "Node") { RecursiveNode(item, wl, nomefile); } } } } }
//private void RecursiveNode(XmlNode node, WordLib wl, XmlDataProviderManager _x, string IDTree, string IDSessione, string IDCliente) private void RecursiveNode(XmlNode node, RTFLib wl, XmlDataProviderManager _x, string IDTree, string IDSessione, string IDCliente, string AdditivaTitolo, string nomefile) { string str; try { if (node.Attributes["ID"].Value == "186") { str = "186"; } if ((node.Attributes["ID"].Value == "142" || node.Attributes["ID"].Value == "2016142") && IDTree == "3") { return; } if (node.Attributes["ID"].Value == "142" && IDTree == "28") { return; } if (node.Attributes["ID"].Value == "261" && IDTree == "19") { return; } if (node.ChildNodes.Count == 1 || node.Attributes["Tipologia"].Value == "Nodo Multiplo") { if (RecursiveCheck(node, IDTree)) { wl.Add(node, IDCliente, IDTree, IDSessione, nomefile); } } else { if (node.ParentNode.Name == "Tree" || RecursiveCheck(node, IDTree)) { wl.AddTitle(node.Attributes["Codice"].Value + " " + node.Attributes["Titolo"].Value + AdditivaTitolo, node.ParentNode.Name != "Tree"); foreach (XmlNode item in node.ChildNodes) { if (item.Name == "Node") { try { RecursiveNode(item, wl, _x, IDTree, IDSessione, IDCliente, "", nomefile); } catch (Exception ex) { cBusinessObjects.logger.Error(ex, "wStampaFascicolo.RecursiveNode1 exception"); str = ex.Message; } } } } } } catch (Exception ex) { cBusinessObjects.logger.Error(ex, "wStampaFascicolo.RecursiveNode2 exception"); str = ex.Message; } }