public object GetTile(Guid tileGuid, Guid applicationId, DateTime startDate, DateTime endDate,
DateTime? startDateCompare, DateTime? endDateCompare)
{
ReportDefinitionSummary reportSummary = this.reportRepository.GetReportSummary(tileGuid);
if (reportSummary.Type == TileType.TrendAndValueOne ||
reportSummary.Type == TileType.TrendAndValueTwo ||
reportSummary.Type == TileType.TrendAndValueThree)
{
if (!startDateCompare.HasValue && !endDateCompare.HasValue)
{
startDateCompare = startDate.AddMonths(6);
endDateCompare = endDate.AddMonths(6);
}
return this.tileRepository.Get(reportSummary.Type, reportSummary.Query.Value, applicationId, startDate, endDate, startDateCompare.Value, endDateCompare.Value);
}
else
{
return this.tileRepository.Get(reportSummary.Type, reportSummary.Query.Value, applicationId, startDate, endDate);
}
}