Ejemplo n.º 1
0
        /// <summary>
        /// Attaches Range filter to specified column without UI
        /// Range column filter supports 2 values (min. and max.) to be specified.
        /// This filter filters out source query leaving records that are having value denoted by column that is in specified range (between min. and max.)
        /// </summary>
        /// <param name="column">Column</param>
        /// <param name="filterDelegate">Filtering delegate</param>
        /// <returns>Fluent</returns>
        public static RangeColumnFilter <TSourceData, TTableColumn> FilterRangeNoUiBy <TSourceData, TTableData, TTableColumn>(
            this ColumnUsage <TSourceData, TTableData, TTableColumn> column,
            Func <IQueryable <TSourceData>, RangeTuple <TTableColumn>, IQueryable <TSourceData> > filterDelegate) where TTableData : new()
        {
            var filter = RangeColumnFilter <TSourceData, TTableColumn> .Create(column.ColumnProperty, column.Configurator, filterDelegate);

            column.Configurator.RegisterFilter(filter);
            return(filter);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Attaches Range filter to specified column.
        /// Range column filter supports 2 values (min. and max.) to be specified.
        /// This filter filters out source query leaving records that are having value denoted by column that is in specified range (between min. and max.)
        /// </summary>
        /// <param name="column">Column</param>
        /// <param name="sourceColumn">Matching source column to be filtered</param>
        /// <returns>Fluent</returns>
        public static RangeColumnFilter <TSourceData, TSourceColumn> FilterRangeNoUi <TSourceData, TTableData, TTableColumn, TSourceColumn>(
            this ColumnUsage <TSourceData, TTableData, TTableColumn> column,
            Expression <Func <TSourceData, TSourceColumn> > sourceColumn
            ) where TTableData : new()
        {
            var filter = RangeColumnFilter <TSourceData, TSourceColumn> .Create(column.ColumnProperty, column.Configurator, sourceColumn);

            column.Configurator.RegisterFilter(filter);
            return(filter);
        }