Beispiel #1
0
 /// <summary>
 /// Gets the attribute.
 /// </summary>
 /// <param name="aggrEnum">The aggr enum.</param>
 /// <returns>AggregateAttribute.</returns>
 public static AggregateAttribute GetAttribute(SummaryTypes aggrEnum)
 {
     return (AggregateAttribute)typeof(SummaryTypes).GetField(aggrEnum.ToString()).GetCustomAttributes(false).First();
 }
Beispiel #2
0
 private static AggregateDefinition CreateAggregateDefinition(GridViewBoundColumnBase gridColumn, IColumnItem columnItem, SummaryTypes aggregateType)
 {
     return AggregateDefinition.Create(
         columnName: string.IsNullOrEmpty(columnItem.AdditionalDataPropertyName)
             ? columnItem.Property.Name
             : columnItem.AdditionalDataPropertyName,
         summaryType: aggregateType.ToString(),
         customConverter: gridColumn.DataMemberBinding.Converter == null
             ? null
             : gridColumn.DataMemberBinding.Converter.GetType().AssemblyQualifiedName,
         targetType: columnItem.Property.PropertyType.FullName,
         typeName: columnItem.Property.PropertyType.ToString(),
         converterParameter: gridColumn.DataMemberBinding.ConverterParameter == null
             ? null
             : gridColumn.DataMemberBinding.ConverterParameter.ToString());
 }