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
@@ -0,0 +1,33 @@
using Avalonia.Controls;
using Avalonia.Interactivity;
using LehrerApp.Desktop.ViewModels.Students;
namespace LehrerApp.Desktop.Views.Students;
public partial class ManageStudentDialog : Window
{
public ManageStudentDialog() => InitializeComponent();
private void OnDeactivate(object? sender, RoutedEventArgs e)
{
if (DataContext is not ManageStudentDialogViewModel vm) return;
vm.DeactivateCommand.Execute(null);
Close(vm.Result);
}
private void OnReactivate(object? sender, RoutedEventArgs e)
{
if (DataContext is not ManageStudentDialogViewModel vm) return;
vm.ReactivateCommand.Execute(null);
Close(vm.Result);
}
private void OnDeletePermanently(object? sender, RoutedEventArgs e)
{
if (DataContext is not ManageStudentDialogViewModel vm) return;
vm.DeletePermanentlyCommand.Execute(null);
if (vm.Result == StudentManagementResult.Deleted) Close(vm.Result);
}
private void OnCancel(object? sender, RoutedEventArgs e) => Close(StudentManagementResult.Cancelled);
}