public ActionResult DeleteExercise(int id, int patientId)
        {
            var exercise = exerciseRepository.GetExerciseById(id);

            exerciseRepository.DeleteExercise(exercise);
            exerciseRepository.Complete();

            return(RedirectToAction("PatientExersicesList", new { patientId }));
        }
Beispiel #2
0
 public ActionResult Delete(int id, IFormCollection collection)
 {
     if (ExerciseRepository.DeleteExercise(id))
     {
         return(RedirectToAction(nameof(Index)));
     }
     else
     {
         return(RedirectToAction(nameof(Details), new { id = id }));
     }
 }
 public ActionResult Delete(int id, Exercise model)
 {
     ExerciseRepository.DeleteExercise(id);
     return(RedirectToAction(nameof(Index)));
 }
Beispiel #4
0
 public ActionResult Delete(int id, IFormCollection collection)
 {
     ExerciseRepository.DeleteExercise(id);
     return(RedirectToAction(nameof(Index)));
 }