protected BindingFilterContextItem(ITemplateView view, BindingFilterDefinition bindingFilterDefinition, IBindingContextElement bindingContextElement)
            : base(bindingContextElement, null)
        {
            this.view = (TemplateView)view;
            this.bindingFilterDefinition = bindingFilterDefinition;
            this.bindingContextElement   = bindingContextElement;

            Dictionary <BindingFilterDefinition, string> filterDefinitionByElement;

            if (!((TemplateView)view).FilterValueByFilterDefinitionByElement.TryGetValue(bindingContextElement.DataSource, out filterDefinitionByElement))
            {
                filterDefinitionByElement = new Dictionary <BindingFilterDefinition, string>();
                ((TemplateView)view).FilterValueByFilterDefinitionByElement[bindingContextElement.DataSource] = filterDefinitionByElement;
            }

            string filterValue;

            filterDefinitionByElement.TryGetValue(bindingFilterDefinition, out filterValue);

            FilterValue = filterValue;
        }
Esempio n. 2
0
 public ExcelBindingFilterContextItem(ITemplateView view, BindingFilterDefinition bindingFilterDefinition, IBindingContextElement bindingContextElement)
     : base(view, bindingFilterDefinition, bindingContextElement)
 {
 }
 public void AddFilterDefinition(BindingFilterDefinition definition)
 {
     BindingParts.Add(definition);
     FilterDefinitions.Add(definition);
 }
Esempio n. 4
0
 private RootBindingFilter(ITemplateView view, BindingFilterDefinition bindingFilterDefinition, string filterValue)
 {
     this.view = (TemplateView)view;
     this.bindingFilterDefinition = bindingFilterDefinition;
     FilterValue = filterValue;
 }