Rock.Model.FinancialPledgeService.GetPledgeAnalytics C# (CSharp) Method

GetPledgeAnalytics() public static method

Gets the pledge analytics.
public static GetPledgeAnalytics ( int accountId, System.DateTime start, System.DateTime end, decimal minAmountPledged, decimal maxAmountPledged, decimal minComplete, decimal maxComplete, decimal minAmountGiven, decimal maxAmountGiven, bool includePledges, bool includeGifts ) : DataSet
accountId int The account identifier.
start System.DateTime The start.
end System.DateTime The end.
minAmountPledged decimal The minimum amount pledged.
maxAmountPledged decimal The maximum amount pledged.
minComplete decimal The minimum complete.
maxComplete decimal The maximum complete.
minAmountGiven decimal The minimum amount given.
maxAmountGiven decimal The maximum amount given.
includePledges bool if set to true [include pledges].
includeGifts bool if set to true [include gifts].
return System.Data.DataSet
        public static DataSet GetPledgeAnalytics( int accountId, DateTime? start, DateTime? end,
            decimal? minAmountPledged, decimal? maxAmountPledged, decimal? minComplete, decimal? maxComplete, decimal? minAmountGiven, decimal? maxAmountGiven, 
            bool includePledges, bool includeGifts )
        {
            Dictionary<string, object> parameters = new Dictionary<string, object>();
            parameters.Add( "AccountId", accountId );

            if ( start.HasValue )
            {
                parameters.Add( "StartDate", start.Value );
            }

            if ( end.HasValue )
            {
                parameters.Add( "EndDate", end.Value );
            }

            if ( minAmountPledged.HasValue )
            {
                parameters.Add( "MinAmountPledged", minAmountPledged.Value );
            }

            if ( maxAmountPledged.HasValue )
            {
                parameters.Add( "MaxAmountPledged", maxAmountPledged.Value );
            }

            if ( minComplete.HasValue )
            {
                parameters.Add( "MinComplete", minComplete.Value / 100 );
            }

            if ( maxComplete.HasValue )
            {
                parameters.Add( "MaxComplete", maxComplete.Value / 100 );
            }

            if ( minAmountGiven.HasValue )
            {
                parameters.Add( "MinAmountGiven", minAmountGiven.Value );
            }

            if ( maxAmountGiven.HasValue )
            {
                parameters.Add( "MaxAmountGiven", maxAmountGiven.Value );
            }

            parameters.Add( "IncludePledges", includePledges );
            parameters.Add( "IncludeGifts", includeGifts );

            var result = DbService.GetDataSet( "spFinance_PledgeAnalyticsQuery", System.Data.CommandType.StoredProcedure, parameters, 180 );

            return result;
        }
FinancialPledgeService