Edit Stammdaten Mitarbeitsessions

This commit is contained in:
2026-08-19 12:47:09 +02:00
parent b2c1b15167
commit 9106b4b0e1
6 changed files with 131 additions and 8 deletions
@@ -23,6 +23,7 @@ public partial class ParticipationTabView : UserControl
{
_vm = vm;
vm.OnAddSession = ShowAddSessionDialog;
vm.OnEditSession = ShowEditSessionDialog;
vm.OnQuickInput = ShowQuickInputDialog;
vm.OnStatusQuickInput = ShowStatusQuickInputDialog;
vm.OnComputeGrade = ShowComputeGradeDialog;
@@ -283,6 +284,17 @@ public partial class ParticipationTabView : UserControl
return ok ? vm.Result : null;
}
private async Task<LehrerApp.Core.Models.ParticipationSession?> ShowEditSessionDialog(
LehrerApp.Core.Models.ParticipationSession session)
{
var vm = new AddSessionDialogViewModel(session);
var dialog = new AddSessionDialog { DataContext = vm };
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return null;
var ok = await dialog.ShowDialog<bool>(owner);
return ok ? vm.Result : null;
}
private async Task ShowQuickInputDialog(ParticipationTabViewModel tabVm)
{
if (tabVm.StudentRows.Count == 0) return;