New: Event und Response Export Methode
Changed: EventRegistrationManager.cs Co-Author: Konstantin Hintermayer
This commit is contained in:
@ -40,10 +40,19 @@ namespace SZUAbsolventenverein.Module.EventRegistration.Manager
|
||||
{
|
||||
// TODO: Export event Responses as well.
|
||||
string content = "";
|
||||
List<Models.Event> EventRegistrations = _EventRepository.GetEvents(module.ModuleId).ToList();
|
||||
if (EventRegistrations != null)
|
||||
List<object> exportData = new List<object>();
|
||||
foreach (var events in _EventRepository.GetEvents(module.ModuleId))
|
||||
{
|
||||
content = JsonSerializer.Serialize(EventRegistrations);
|
||||
var responses = _ResponseRepository.GetResponses(events.EventId, module.ModuleId);
|
||||
exportData.Add(new
|
||||
{
|
||||
Event = events,
|
||||
Responses = responses.ToList()
|
||||
});
|
||||
};
|
||||
if (exportData != null)
|
||||
{
|
||||
content = JsonSerializer.Serialize(exportData);
|
||||
}
|
||||
return content;
|
||||
}
|
||||
|
Reference in New Issue
Block a user