Mitarbeit bewerten begonnen, Schülerdaten, Gruppen
This commit is contained in:
@@ -40,9 +40,19 @@ public class App : Application
|
||||
var dash = Services.GetRequiredService<DashboardViewModel>();
|
||||
dash.OnNavigateToGroup = id => main.NavigateToGroupDetail(id);
|
||||
|
||||
// StudentList → StudentDetail
|
||||
// StudentList → StudentDetail + Anlegen
|
||||
var sl = Services.GetRequiredService<StudentListViewModel>();
|
||||
sl.OnNavigateToDetail = id => main.NavigateToStudent(id);
|
||||
sl.OnAddStudent = () => ShowAddStudentDialog();
|
||||
}
|
||||
|
||||
private static async Task ShowAddStudentDialog()
|
||||
{
|
||||
var vm = new ViewModels.Students.AddStudentDialogViewModel(
|
||||
Services.GetRequiredService<Core.Interfaces.IStudentRepository>());
|
||||
var dialog = new Views.Students.AddStudentDialog { DataContext = vm };
|
||||
if (Application.Current?.ApplicationLifetime is IClassicDesktopStyleApplicationLifetime { MainWindow: { } owner })
|
||||
await dialog.ShowDialog<bool>(owner);
|
||||
}
|
||||
|
||||
private static async void ShowAddGroupDialog(GroupListViewModel groupList)
|
||||
|
||||
Reference in New Issue
Block a user