Exemple #1
0
 private static string getColumnNameFor(string name, Aggregate func, string datafield, char separator)
 {
     return(getColumnNameFor(getColumnNameFor(name, func, separator), datafield));
 }
Exemple #2
0
        /// <summary>
        ///    Aggregates sub data of data view.
        /// </summary>
        /// <param name="data">Data view containing all data.</param>
        /// <param name="filter">Filter to filter with.</param>
        /// <param name="dataField">Column to take values from.</param>
        /// <param name="aggregate">Function to be used for aggregation.</param>
        /// <returns>Aggregated value.</returns>
        private static object getData(DataView data, string filter, string dataField, Aggregate aggregate)
        {
            var filteredRows = data.Table.Select(filter);
            var objList      = filteredRows.Select(x => x[dataField]).ToArray();

            return(aggregate.PerformAggregation(objList) ?? DBNull.Value);
        }
Exemple #3
0
 private static string getColumnNameFor(Aggregate func, string datafield)
 {
     return(getColumnNameFor(func.Name, datafield));
 }