public void SaveRandomWorkout() { // Summary // // Saves selected workout to the DB then refreshes the list MongoHelper.AddWorkoutAsync(SelectedWorkout); ReadWorkouts(); }
public void SaveCustomWorkout(object parameter) { // Summary // // Save Custom made workout if (parameter == null) { throw new ArgumentNullException(); } (parameter as Workout).Length = Workout.GenerateLength(parameter as Workout); MongoHelper.AddWorkoutAsync(parameter as Workout); ReadWorkouts(); BuildingWorkout = false; CustomWorkout = null; _customWorkoutExerciseCount = 0; }