Пример #1
0
        protected override void ParseAttribute(XmlNode attr)
        {
            switch (attr.Name.ToLower())
            {
            case "name":
                _name = attr.InnerText;
                break;

            case "datatype":
                _dataType = Type.GetType(attr.InnerText);
                break;

            case "nullable":
                _nullable = bool.Parse(attr.InnerText);
                break;

            case "defaultvalue":
                _defaultValue = new DefaultValue(attr, this);
                break;

            case "allowblank":
                _allowBlank = bool.Parse(attr.InnerText);
                break;

            case "prompt":
                _prompt = attr.InnerText;
                break;

            case "hidden":
                _hidden = bool.Parse(attr.InnerText);
                break;

            case "validvalues":
                XmlNode child = attr.ChildNodes[0];
                if (child.Name.ToLower() == "parametervalues")
                {
                    foreach (XmlNode parm in child.ChildNodes)
                    {
                        _validValues.Add(new ParameterValue(parm, this));
                    }
                }
                if (child.Name.ToLower() == "DataSetReference")
                {
                    _validValuesDS = new DataSetReference(child, this);
                }
                break;

            case "multivalue":
                _multiValue = bool.Parse(attr.InnerText);
                break;

            case "usedinquery":
                _usedInQuery = (Enums.Auto)Enum.Parse(typeof(Enums.Auto), attr.InnerText, true);
                break;

            default:
                break;
            }
        }
Пример #2
0
        protected override void ParseAttribute(XmlNode attr)
        {
            switch (attr.Name.ToLower())
            {
            case "datasetreference":
                _dataSetReference = new DataSetReference(attr, this);
                break;

            case "values":
                _values = new List <Expression>();
                foreach (XmlNode child in attr.ChildNodes)
                {
                    _values.Add(new Expression(child, this));
                }
                break;

            default:
                break;
            }
        }