Exemplo n.º 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;
            }
        }
Exemplo n.º 2
0
        protected override void ParseAttribute(XmlNode attr)
        {
            switch (attr.Name.ToLower())
            {
            case "name":
                _name = attr.InnerText;
                break;

            case "fields":
                foreach (XmlNode child in attr.ChildNodes)
                {
                    Field fld = new Field(child, this);
                    _fields.Add(fld.Name, fld);
                }
                break;

            case "query":
                _query = new Query(attr, this);
                break;

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

            case "colation":
                _colation = attr.InnerText;
                break;

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

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

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

            case "filters":
                _filters = new Filters(attr, this);
                break;

            default:
                break;
            }
        }
Exemplo n.º 3
0
        protected override void ParseAttribute(XmlNode attr)
        {
            switch (attr.Name.ToLower())
            {
            case "name":
                _name = attr.InnerText;
                break;

            case "datatype":
                switch (attr.InnerText)
                {
                case "Boolean":
                    _dataType = Type.GetType("System.Boolean", true, true);
                    break;

                case "DateTime":
                    _dataType = Type.GetType("System.DateTime", true, true);
                    break;

                case "Integer":
                    _dataType = Type.GetType("System.Int32", true, true);
                    break;

                case "Float":
                    _dataType = Type.GetType("System.Single", true, true);
                    break;

                case "String":
                    _dataType = Type.GetType("System.String", true, true);
                    break;

                default:
                    throw new Exception("Unknown type " + attr.InnerText + " in parameter definition");
                }
                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;
            }
        }