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.
|
// TODO: Export event Responses as well.
|
||||||
string content = "";
|
string content = "";
|
||||||
List<Models.Event> EventRegistrations = _EventRepository.GetEvents(module.ModuleId).ToList();
|
List<object> exportData = new List<object>();
|
||||||
if (EventRegistrations != null)
|
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;
|
return content;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user