Kapitel 7 abgeschlossen.

This commit is contained in:
2026-08-16 00:29:01 +02:00
parent da8d2bb1da
commit f9e398b225
47 changed files with 2636 additions and 107 deletions
@@ -15,6 +15,7 @@ public partial class GroupListView : UserControl
{
vm.OnAddGroup = ShowAddGroupDialog;
vm.OnEditGroup = ShowEditGroupDialog;
vm.OnRollOverGroup = ShowGroupRolloverDialog;
vm.OnConfirmDelete = ShowDeleteGroupDialog;
}
}
@@ -42,6 +43,23 @@ public partial class GroupListView : UserControl
await dialog.ShowDialog<bool>(owner);
}
private async Task<Guid?> ShowGroupRolloverDialog(Guid groupId)
{
var group = App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IGroupRepository>()
.GetById(groupId);
var owner = TopLevel.GetTopLevel(this) as Window;
if (group is null || owner is null) return null;
var dialogVm = new GroupRolloverDialogViewModel(group,
App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IStudentRepository>(),
App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IGroupMembershipRepository>(),
App.Services.GetRequiredService<LehrerApp.Core.Interfaces.IGradingSchemeRepository>(),
App.Services.GetRequiredService<LehrerApp.Core.Services.SchoolYearService>(),
App.Services.GetRequiredService<LehrerApp.Core.Services.GroupRolloverService>());
var dialog = new GroupRolloverDialog { DataContext = dialogVm };
return await dialog.ShowDialog<Guid?>(owner);
}
private async Task<bool> ShowDeleteGroupDialog(GroupListItem group)
{
var dialog = new DeleteGroupDialog { DataContext = group.DisplayName };