public override void toControl(Hashtable values) { object o = values[fieldName]; if (o != null) { string xmlString = o.ToString(); System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument(); if (!string.IsNullOrEmpty(xmlString)) { xmlDoc.LoadXml(xmlString); System.Xml.XmlNodeList xmlNodeList = xmlDoc.DocumentElement.GetElementsByTagName(xmlNodeName); if (xmlNodeList.Count > 0) { o = xmlNodeList[0].InnerXml; bool found = false; System.Collections.Generic.List <WFSelectValue> list = valueList.getValues(Binding.DBConn, filter, null); foreach (WFSelectValue sv in list) { if (sv.key.Equals(o)) { o = sv.name; found = true; break; } } if (o.ToString().Equals("0")) { label.Text = string.Empty; } else if (found || showInvalid) { label.Text = HTMLUtils.toHTMLText(o.ToString()); } else { label.Text = string.Empty; } return; } } } label.Text = string.Empty; }
public override void toControl(Hashtable values) { //base.toControl(values); object o = values[fieldName]; if (o != null) { string xmlString = o.ToString(); System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument(); if (!string.IsNullOrEmpty(xmlString)) { xmlDoc.LoadXml(xmlString); System.Xml.XmlNodeList xmlNodeList = xmlDoc.DocumentElement.GetElementsByTagName(xmlNodeName); if (xmlNodeList.Count > 0) { label.Text = HTMLUtils.toHTMLText(xmlNodeList[0].InnerXml); } } } }