Beispiel #1
0
        static ResultTable ExecuteChart <T>(ChartRequest request, DynamicQueryCore <T> dq)
        {
            List <Column> columns = request.Columns.Where(c => c.Token != null).Select(t => t.CreateColumn()).ToList();

            var multiplications = request.Multiplications;;

            using (ExecutionMode.UserInterface())
            {
                if (!request.GroupResults)
                {
                    return(dq.ExecuteQuery(new QueryRequest
                    {
                        QueryName = request.QueryName,
                        Columns = columns,
                        Filters = request.Filters,
                        Orders = request.Orders,
                        Pagination = new Pagination.All(),
                    }));
                }
                else
                {
                    return(dq.ExecuteQueryGroup(new QueryGroupRequest
                    {
                        QueryName = request.QueryName,
                        Columns = columns,
                        Filters = request.Filters,
                        Orders = request.Orders
                    }));
                }
            }
        }
Beispiel #2
0
 static ResultTable ExecuteChart <T>(ChartRequestModel request, DynamicQueryCore <T> dq)
 {
     using (ExecutionMode.UserInterface())
     {
         return(dq.ExecuteQuery(new QueryRequest
         {
             GroupResults = request.HasAggregates(),
             QueryName = request.QueryName,
             Columns = request.GetQueryColumns(),
             Filters = request.Filters,
             Orders = request.GetQueryOrders(),
             Pagination = new Pagination.All(),
         }));
     }
 }