Example #1
0
        // Ick, duplicated from DatabaseTrackListModel
        public override string GetSqlFilter()
        {
            string filter = null;

            // If the only item is the "All" item, then we shouldn't allow any matches, so insert an always-false condition
            if (HasSelectAllItem && Count == 1)
            {
                return("0=1");
            }
            else
            {
                ModelHelper.BuildIdFilter <object> (GetSelectedObjects(), FilterColumn, null,
                                                    delegate(object item) {
                    if (!select_all_item.Equals(item))
                    {
                        return(ItemToFilterValue(item));
                    }
                    return(null);
                },
                                                    delegate(string new_filter) { filter = new_filter; }
                                                    );
            }

            return(filter);
        }