MergeColumns() public static method

public static MergeColumns ( IEnumerable columns, ColumnOptionsMode mode, QueryDescription qd ) : List
columns IEnumerable
mode ColumnOptionsMode
qd Signum.Entities.DynamicQuery.QueryDescription
return List
コード例 #1
0
        public void GenerateListViewColumns()
        {
            if (IsSearching)
            {
                generateListViewColumnsQueued = true;
                return;
            }

            List <Column> columns = ColumnOption.MergeColumns(ColumnOptions, ColumnOptionsMode, Description);

            gvResults.Columns.Clear();

            foreach (var co in columns)
            {
                AddListViewColumn(co);
            }
        }
コード例 #2
0
        public static QueryRequest ToRequest(this QueryOptions options)
        {
            QueryDescription qd = GetQueryDescription(options.QueryName);

            ColumnOption.SetColumnTokens(options.ColumnOptions, qd);
            FilterOption.SetFilterTokens(options.FilterOptions, qd);
            OrderOption.SetOrderTokens(options.OrderOptions, qd);

            var request = new QueryRequest
            {
                QueryName  = options.QueryName,
                Filters    = options.FilterOptions.Select(f => f.ToFilter()).ToList(),
                Orders     = options.OrderOptions.Select(f => f.ToOrder()).ToList(),
                Columns    = ColumnOption.MergeColumns(options.ColumnOptions, options.ColumnOptionsMode, qd),
                Pagination = options.Pagination ?? QueryOptions.DefaultPagination,
            };

            return(request);
        }