예제 #1
0
 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);
            }
        }