示例#1
0
        public DependExpress AddDependExpress()
        {
            DependExpress de = new DependExpress();

            this.Add(de);
            return(de);
        }
示例#2
0
        public DependExpress AddDependExpress(string fieldId, string value)
        {
            DependExpress de = new DependExpress();

            de.FieldId = fieldId;
            de.Value   = value;
            this.Add(de);
            return(de);
        }
示例#3
0
        /**
         * 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;
        }
示例#4
0
 public void Add(DependExpress de)
 {
     dependExpressList.Add(de);
 }
示例#5
0
 public void Add(DependExpress de)
 {
     dependExpressList.Add(de);
 }
示例#6
0
 public DependExpress AddDependExpress(string fieldId, string value)
 {
     DependExpress de = new DependExpress();
     de.FieldId = fieldId;
     de.Value = value;
     this.Add(de);
     return de;
 }
示例#7
0
 public DependExpress AddDependExpress()
 {
     DependExpress de = new DependExpress();
     this.Add(de);
     return de;
 }