Пример #1
0
        public static MultiColumnFilter <TSourceData, TVal> Create(PropertyInfo columnProp, IConfigurator conf, Func <IQueryable <TSourceData>, IEnumerable <TVal>, IQueryable <TSourceData> > filterDelegate)
        {
            columnProp = conf.CheckTableColum(columnProp);
            var instance = new MultiColumnFilter <TSourceData, TVal>(columnProp.Name, conf, filterDelegate);

            return(instance);
        }
Пример #2
0
        public static MultiColumnFilter <TSourceData, TVal> Create <TSourceColumn>(PropertyInfo columnProp, IConfigurator conf,
                                                                                   Expression <Func <TSourceData, TSourceColumn> > column)
        {
            columnProp = conf.CheckTableColum(columnProp);
            var ex       = column; //LambdaHelpers.FixNullableColumn(column);
            var instance = new MultiColumnFilter <TSourceData, TVal>(columnProp.Name, conf, ex);

            return(instance);
        }
Пример #3
0
        /// <summary>
        /// Attaches Multi-Select filter to column
        /// </summary>
        /// <param name="column">Column configuration</param>
        /// <param name="sourceColumn">Source column</param>
        /// <returns></returns>
        public static MultiColumnFilter <TSourceData, TSourceColumn> FilterMultiSelectNoUi <TSourceData, TTableData, TTableColumn, TSourceColumn>(
            this ColumnUsage <TSourceData, TTableData, TTableColumn> column,
            Expression <Func <TSourceData, TSourceColumn> > sourceColumn
            ) where TTableData : new()
        {
            var filter = MultiColumnFilter <TSourceData, TSourceColumn> .Create(column.ColumnProperty, column.Configurator, sourceColumn);

            var configurator = column;

            configurator.TableConfigurator.RegisterFilter(filter);
            return(filter);
        }
Пример #4
0
        /// <summary>
        /// Attaches Multi-Select filter to column
        /// </summary>
        /// <param name="column">Column configuration</param>
        /// <param name="filterDelegate">Filtering function base on value received from filter</param>
        /// <returns></returns>
        public static MultiColumnFilter <TSourceData, TSourceColumn> FilterMultiSelectNoUiBy <TSourceData, TTableData, TTableColumn, TSourceColumn>(
            this ColumnUsage <TSourceData, TTableData, TTableColumn> column,
            Func <IQueryable <TSourceData>, IEnumerable <TSourceColumn>, IQueryable <TSourceData> > filterDelegate)
            where TTableData : new()
        {
            var filter = MultiColumnFilter <TSourceData, TSourceColumn> .Create(column.ColumnProperty, column.Configurator, filterDelegate);

            var configurator = column;

            configurator.TableConfigurator.RegisterFilter(filter);
            return(filter);
        }