private void NavToAddStudent(Student student) { //_ChartViewModel.TestDTO = test; //CurrentViewModel = _ChartViewModel; _addEditStudentViewModel.EditMode = false; _addEditStudentViewModel.SetStudent(student); CurrentViewModel = _addEditStudentViewModel; }
private async void NavToAddStudent(Data.Student selectedStudent) { CurrentViewModel = _addEditStudentViewModel; try { _attendanceViewModel.SwitchOff(); _addEditStudentViewModel.EditMode = false; _addEditStudentViewModel.SetStudent(selectedStudent); _addEditStudentViewModel.Initialize(); } catch (Exception error) { var result = await DialogHelper.ShowDialog(DialogType.Error, "Something went wrong. Please try again."); Logger.Error(error); } }