Import & Export von events und deren Responses. #2

Open
opened 2025-06-02 08:38:24 +00:00 by Kocoder · 1 comment
Owner

public string ExportModule(Oqtane.Models.Module module)
{
// TODO: Export event Responses as well.
string content = "";
List<Models.Event> EventRegistrations = _EventRepository.GetEvents(module.ModuleId).ToList();
if (EventRegistrations != null)
{
content = JsonSerializer.Serialize(EventRegistrations);
}
return content;
}
public void ImportModule(Oqtane.Models.Module module, string content, string version)
{
// TODO: Import event Responses as well.
List<Models.Event> EventRegistrations = null;
if (!string.IsNullOrEmpty(content))
{
EventRegistrations = JsonSerializer.Deserialize<List<Models.Event>>(content);
}
if (EventRegistrations != null)
{
foreach(var EventRegistration in EventRegistrations)
{
_EventRepository.AddEvent(new Models.Event { ModuleId = module.ModuleId, Name = EventRegistration.Name });
}
}
}

https://git.kocoder.xyz/Diplomarbeit-Absolventenverein/Module.EventRegistration/src/commit/f63681bce5ad5b669458f6039670be89946c85fd/Server/Manager/EventRegistrationManager.cs#L39-L66
Florian was assigned by Kocoder 2025-06-02 08:38:24 +00:00
Kocoder added the
Priority
High
Backend
labels 2025-06-02 08:47:41 +00:00
Florian added spent time 1 hour 2025-06-02 09:54:50 +00:00
Member

Export funktioniert Import fehlt noch

Export funktioniert Import fehlt noch
Sign in to join this conversation.
2 Participants
Notifications
Total Time Spent: 1 hour
Florian
1 hour
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Diplomarbeit-Absolventenverein/Module.EventRegistration#2
No description provided.