Ejemplo n.º 1
0
        public IDataFilter GetFilter(string templateName)
        {
            SQLXmlDALManagerFactory.NamedXPathTemplate template = catalogXPathTemplate[templateName];
            XPathTemplateFilter filter = new XPathTemplateFilter(template);

            return(filter);
        }
Ejemplo n.º 2
0
 public XPathTemplateFilter(SQLXmlDALManagerFactory.NamedXPathTemplate template)
 {
     this.templateName = template.Key;
     parameters        = new List <DataFilterParameter>();
     conditions        = new List <DataFilterCondition>();
     foreach (SQLXmlDALManagerFactory.XPathTemplateParameter parameter in template.Parameters)
     {
         this.parameters.Add(
             new DataFilterParameter(parameter.Name, parameter.Caption, Type.GetType(parameter.Type), parameter.DefaultValue, parameter.ConditionType));
     }
     formatter = CreateFormatter(template.Key, template.FilterFormatter);
 }