private List <XmlNode> findSimilar(string filter, string diam, List <XmlNode> rebars, XmlDocument xmlDoc) { List <XmlNode> similar = new List <XmlNode>(); _Mark u = new _Mark(0, 10, "", filter, 0); XmlNode newNode = XML_Handle.newNodeHandle(u, "", xmlDoc, _c.ed); newNode["B2aBar"]["Dim"].InnerText = diam; similar = XML_Handle.findSimilar(newNode, rebars); return(similar); }
private List <XmlNode> handleUndefined(List <_Mark> undefined, List <XmlNode> rebars, XmlDocument xmlDoc) { List <XmlNode> newRebar = new List <XmlNode>(); write(" "); foreach (_Mark u in undefined) { write("--- Not found: " + u.ToString()); } string materjal = promptGetMaterial(); foreach (_Mark u in undefined) { bool add = promptAddRebarToXml(u); if (add) { XmlNode newNode = XML_Handle.newNodeHandle(u, materjal, xmlDoc, _c.ed); XmlNode dublicate = checkIfRebarExists(newNode, rebars); if (dublicate == null) { newRebar.Add(newNode); } else { write("Sama kujuga raud on juba olemas!"); XmlNode rebar = dublicate["B2aBar"]; string rebarString = XML_Handle.getXMLRebarString(rebar); write(rebarString); } } else { write("Skip: " + u.ToString()); } } return(newRebar); }