public void loadCollectionItem(XmlNode xmlNode) { IsField = false; collIdList = new List <UIElement>(); string collectionHtml = string.Empty; XmlNodeList nodeLst = xmlNode.ChildNodes; foreach (XmlNode headerItem in nodeLst) { UIElement newelement = new UIElement(); XmlNode namedItem = headerItem.Attributes.GetNamedItem("ID"); newelement.Id = namedItem.InnerText; XmlNode namedDF = headerItem.Attributes.GetNamedItem("Format"); newelement.DisplayFormat = namedDF.InnerText; collIdList.Add(newelement); } using (TXNIdLabelMapper childform = new TXNIdLabelMapper()) { childform.setTransactionValue(collIdList, "TEXTBOX", false, "Collection header mapper"); childform.ShowDialog(this); } }
public void loadXML() { sb = new StringBuilder(); sbHtml = new StringBuilder(); collectionHTMLList = new List <string>(); counter = 0; ltopSpace = 30; tabindex = 0; try { counter = 0; idList = new List <UIElement>(); XmlNode newGroupNode = xmltransactionDefination.SelectSingleNode("/GROUP" + "/" + comboBoxTXRX.Text); XmlNodeList headerNodeList = xmltransactionDefination.SelectSingleNode("/GROUP" + "/" + comboBoxTXRX.Text).ChildNodes; if (headerNodeList != null) { foreach (XmlNode headerAttribute in headerNodeList) { if (headerAttribute.Name.Contains("FIELD")) { IsField = true; UIElement newelement = new UIElement(); XmlNode namedItem = headerAttribute.Attributes.GetNamedItem("ID"); newelement.Id = namedItem.InnerText; XmlNode namedDF = headerAttribute.Attributes.GetNamedItem("Format"); newelement.DisplayFormat = namedDF.InnerText; idList.Add(newelement); } else if (headerAttribute.Name.Contains("COLLECTION")) { loadCollectionItem(headerAttribute); //collectionHTMLList.Add(collectionHtml); } } } using (TXNIdLabelMapper childform = new TXNIdLabelMapper()) { childform.setTransactionValue(idList, comboBoxControlType.Text); childform.ShowDialog(this); } } catch { } }