public DependExpress AddDependExpress() { DependExpress de = new DependExpress(); this.Add(de); return(de); }
public DependExpress AddDependExpress(string fieldId, string value) { DependExpress de = new DependExpress(); de.FieldId = fieldId; de.Value = value; this.Add(de); return(de); }
/** * xml Element to DependGroup * @param dependGroupEle * @param fieldId * @return * @throws TopSchemaException */ private static DependGroup ElementToDependGroup(XmlElement dependGroupEle, string fieldId) { if (dependGroupEle == null) { return null; } String dependGroupOperator = XmlUtils.GetAttributeValue(dependGroupEle, "operator"); if (StringUtil.IsEmpty(dependGroupOperator)) { dependGroupOperator = "and"; } DependGroup dg_result = new DependGroup(); dg_result.Operators = dependGroupOperator; List<XmlElement> deEleList = XmlUtils.GetChildElements(dependGroupEle, "depend-express"); foreach (XmlElement deEle in deEleList) { DependExpress de = new DependExpress(); String deFieldId = XmlUtils.GetAttributeValue(deEle, "fieldId"); String deValue = XmlUtils.GetAttributeValue(deEle, "value"); String deSymbol = XmlUtils.GetAttributeValue(deEle, "symbol"); de.FieldId = deFieldId; de.Value = deValue; de.Symbol = deSymbol; dg_result.Add(de); } List<XmlElement> dgEleList = XmlUtils.GetChildElements(dependGroupEle, "depend-group"); foreach (XmlElement dgSubEle in dgEleList) { DependGroup subGroup = new DependGroup(); subGroup = ElementToDependGroup(dgSubEle, fieldId); dg_result.Add(subGroup); } return dg_result; }
public void Add(DependExpress de) { dependExpressList.Add(de); }
public DependExpress AddDependExpress(string fieldId, string value) { DependExpress de = new DependExpress(); de.FieldId = fieldId; de.Value = value; this.Add(de); return de; }
public DependExpress AddDependExpress() { DependExpress de = new DependExpress(); this.Add(de); return de; }