Example #1
0
        public void AddFilter(FilterControl control)
        {
            var sfi = new SearchFilterItem();

            sfi.PropertyName = control.Property.Name.Clone() as string;
            if (control.Property is SetPropertyDef)
            {
                sfi.SelectedComparison = ((DataNew.Entities.Set)control.comparisonList.SelectedItem).Id.ToString();
                sfi.IsSetProperty      = true;
            }
            else
            {
                sfi.SelectedComparison = ((SqlComparison)control.comparisonList.SelectedItem).Name.Clone() as string;
            }
            sfi.CompareValue = control.comparisonText.Text.Clone() as string;
            this.Filters.Add(sfi);
        }
Example #2
0
 public void AddFilter(FilterControl control)
 {
     var sfi = new SearchFilterItem();
     sfi.PropertyName = control.Property.Name.Clone() as string;
     if (control.Property is SetPropertyDef)
     {
         sfi.SelectedComparison = ((DataNew.Entities.Set)control.comparisonList.SelectedItem).Id.ToString();
         sfi.IsSetProperty = true;
         sfi.ExcludeSetProperty = control.ExcludeSet;
     }
     else
     {
         sfi.SelectedComparison = ((SqlComparison)control.comparisonList.SelectedItem).Name.Clone() as string;
     }
     sfi.CompareValue = control.comparisonText.Text.Clone() as string;
     this.Filters.Add(sfi);
 }