Ejemplo n.º 1
0
		public static FeedbackAssignmentDTOContainer CreateFeedbackAssignmentDTOContainer(List<FeedbackSubmissionExercises> exercises, int profileID, int gymID)
		{
			FeedbackAssignmentDTOContainer returnContainer = new FeedbackAssignmentDTOContainer();
			returnContainer.UserTemplateExercises = new List<FeedbackAssignmentDTO> ();
			returnContainer.ProfileID = profileID;
			returnContainer.GymID = gymID;
			int sequence = 1;
			foreach (FeedbackSubmissionExercises feedbackSubmission in exercises) {
				FeedbackAssignmentDTO feedbackAssignment = new FeedbackAssignmentDTO ();

				//Exercise exercise = ExerciseDAL.GetExercisesByExerciseID (gymID, profileID);
				feedbackAssignment.ExerciseID = feedbackSubmission.ExerciseID;
				feedbackAssignment.TargetSets = feedbackSubmission.Sets;
				feedbackAssignment.TargetReps = feedbackSubmission.Reps;

				feedbackAssignment.TargetWeight = feedbackSubmission.Weight;

				feedbackAssignment.HeartRate = feedbackSubmission.HeartRate;
				feedbackAssignment.Duration = feedbackSubmission.Duration;


				feedbackAssignment.SeatPosLabel1 = feedbackSubmission.SeatPosition1Label;
				feedbackAssignment.SeatPosLabel2 = feedbackSubmission.SeatPosition2Label;
				feedbackAssignment.SeatPosLabel3 = feedbackSubmission.SeatPosition3Label;
				feedbackAssignment.SeatPosLabel4 = feedbackSubmission.SeatPosition4Label;

				feedbackAssignment.SeatPosValue1 = feedbackSubmission.SeatPosition1Value;
				feedbackAssignment.SeatPosValue2 = feedbackSubmission.SeatPosition2Value;
				feedbackAssignment.SeatPosValue3 = feedbackSubmission.SeatPosition3Value;
				feedbackAssignment.SeatPosValue4 = feedbackSubmission.SeatPosition4Value;

				feedbackAssignment.LastUpdatedContext = "MobileFit_Coach";
				feedbackAssignment.ExerciseSequence = sequence++;
				returnContainer.UserTemplateExercises.Add (feedbackAssignment);
			}
			return returnContainer;
		}
Ejemplo n.º 2
0
		public static FeedbackAssignmentDTOContainer CreateFeedbackAssignmentDTOContainer(ObservableCollection<ExerciseViewModel> exercises, int profileID, int gymID)
		{
			FeedbackAssignmentDTOContainer returnContainer = new FeedbackAssignmentDTOContainer();
			returnContainer.UserTemplateExercises = new List<FeedbackAssignmentDTO> ();
			returnContainer.ProfileID = profileID;
			returnContainer.GymID = gymID;
			int sequence = 1;
			foreach (ExerciseViewModel exerciseViewModel in exercises) {
				FeedbackAssignmentDTO feedbackAssignment = new FeedbackAssignmentDTO ();

				feedbackAssignment.ExerciseID = exerciseViewModel.Exercise.ExerciseID;
				feedbackAssignment.TargetSets = exerciseViewModel.Sets;
				feedbackAssignment.TargetReps = exerciseViewModel.Reps;

				//feedbackAssignment.HeartRate = exerciseViewModel.TargetHRMin;

				feedbackAssignment.Duration = exerciseViewModel.Duration;
				feedbackAssignment.IsCardioExercise = exerciseViewModel.Exercise.CardioExID != 0 ? true : false;

				feedbackAssignment.TargetWeight = exerciseViewModel.Weight;

				feedbackAssignment.LastUpdatedContext = "MobileFit_Coach";
				feedbackAssignment.ExerciseSequence = sequence++;
				returnContainer.UserTemplateExercises.Add (feedbackAssignment);
			}
			return returnContainer;
		}