Files

42 lines
1.2 KiB
C#
Raw Permalink Normal View History

2021-04-29 16:11:53 +02:00
using System.Collections.Generic;
using System.Linq;
using BeWo.Service.Plugins;
using BS.Shared;
using BS.Shared.DataContracts;
using BS.Shared.Extensions;
namespace demo_reports.Service
{
public class CustomQueryService : QueryService
{
public override List<QueryDC> GetAllQueriesOfType(QueryType pType)
{
var list = base.GetAllQueriesOfType(pType);
list.DoForEach(query =>
{
if(query.ReportTypeName?.Equals("FlsAuslastungsauswertung") ?? false)
{
if(query.Parameter?.Any() ?? false)
{
query.Parameter.DoForEach(parameter =>
{
if(parameter.ParamType == QueryParameterType.Custom)
{
parameter.CustomValues = new List<string>
{
"Tag",
"Woche",
"Monat"
};
}
});
}
}
});
return list;
}
}
}