Vereinsmeisterschaften  22aa7800eae54b428d40e835886cefe1fdefdfdf
This is a software that can be used to manage the internal competition of the swimming club Illertissen called "Vereinsmeisterschaften".
Loading...
Searching...
No Matches
AnalyticsModulePersonCounters.cs
4
6{
11 {
12 private IPersonService _personService;
13
19 {
20 _personService = personService;
21 }
22
24 public bool AnalyticsAvailable => true;
25
29 public int NumberOfPeople => _personService.PersonCount;
30
34 public int NumberOfActivePeople => _personService.GetPersons().Count(p => p.IsActive);
35
39 public int NumberOfInactivePeople => _personService.GetPersons().Count(p => !p.IsActive);
40
43 {
44 DocXPlaceholderHelper.TextPlaceholders textPlaceholder = new DocXPlaceholderHelper.TextPlaceholders();
45 foreach (string placeholder in Placeholders.Placeholders_AnalyticsPersonCountersNumberPeople) { textPlaceholder.Add(placeholder, NumberOfPeople.ToString()); }
46 foreach (string placeholder in Placeholders.Placeholders_AnalyticsPersonCountersNumberActivePeople) { textPlaceholder.Add(placeholder, NumberOfActivePeople.ToString()); }
47 foreach (string placeholder in Placeholders.Placeholders_AnalyticsPersonCountersNumberInactivePeople) { textPlaceholder.Add(placeholder, NumberOfInactivePeople.ToString()); }
48 return textPlaceholder;
49 }
50
52 public List<string> SupportedDocumentPlaceholderKeys => new List<string>()
53 {
54 Placeholders.PLACEHOLDER_KEY_ANALYTICS_PERSON_COUNTERS_NUMBER_PEOPLE,
55 Placeholders.PLACEHOLDER_KEY_ANALYTICS_PERSON_COUNTERS_NUMBER_ACTIVE_PEOPLE,
56 Placeholders.PLACEHOLDER_KEY_ANALYTICS_PERSON_COUNTERS_NUMBER_INACTIVE_PEOPLE
57 };
58 }
59}
AnalyticsModulePersonCounters(IPersonService personService)
Constructor for the AnalyticsModulePersonCounters
List< string > SupportedDocumentPlaceholderKeys
List of all document placeholder keys that are supported by this analytics module....
DocXPlaceholderHelper.TextPlaceholders CollectDocumentPlaceholderContents()
Collect the values for all document placeholders that are supported by this IAnalyticsModule....
bool AnalyticsAvailable
Flag indicating if the analytics module has data.
Interface for a service used to get and store a list of Person objects.