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, false)); } break; default: break; } }
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; } }