private void Save()
 {
     try
     {
         this.Commit();
         Messenger.Default.Send(new EndEditingPracticeRoutineMessage(practiceRoutine, EditorCloseOperation.Saved,
                                                                     LifeCycleState));
     }
     catch
     {
         dialogService.ExclamationMessage("Error", "Cannot update. You cannot add a duplicate exercise to a time slot.");
     }
 }
Exemple #2
0
 private void DeleteExercise()
 {
     try
     {
         if (dialogService.YesNoPrompt("Delete Exercise", "Sure you'd like to delete this exercise?"))
         {
             exerciseService.Remove(SelectedExercise.Id);
             ExerciseList.Remove(SelectedExercise);
         }
     }
     catch
     {
         dialogService.ExclamationMessage("Deletion Error",
                                          "Cannot delete an exercise that has already been added to routine or/and has been practiced. Archive instead.");
     }
 }