Exemplo n.º 1
0
        public override bool Equals(object obj)
        {
            ItemInFilter fd = obj as ItemInFilter;

            if (fd != null)
            {
                return(fd.filterData.Text == this.filterData.Text &&
                       fd.filterData.Value == this.filterData.Value);
            }
            else
            {
                return(base.Equals(obj));
            }
        }
Exemplo n.º 2
0
        public GridFilter(IEnumerable <IFilterData> fD, IFilterData defaultFilterItem, string name)
        {
            var items = new List <ItemInFilter>();

            foreach (IFilterData f in fD)
            {
                if (f.Equals(defaultFilterItem))
                {
                    f.Selected = true;
                }
                items.Add(new ItemInFilter(f));
            }
            this.items       = items;
            this.name        = name;
            this.defaultItem = new ItemInFilter(defaultFilterItem);
            CSSId            = "js_filter_" + name;
        }