Files
LehrerApp/LehrerApp.Desktop/Views/Students/StudentImportDialog.axaml.cs
T

19 lines
530 B
C#

using Avalonia.Controls;
using Avalonia.Interactivity;
using LehrerApp.Desktop.ViewModels.Students;
namespace LehrerApp.Desktop.Views.Students;
public partial class StudentImportDialog : Window
{
public StudentImportDialog() => InitializeComponent();
private async void OnApply(object? sender, RoutedEventArgs e)
{
if (DataContext is StudentImportDialogViewModel vm && await vm.TryApplyAsync())
Close(true);
}
private void OnCancel(object? sender, RoutedEventArgs e) => Close(false);
}