// mapping data back to routineWorkout DAO public routineWorkoutModel map(routineWorkoutDAO _routineWorkoutMod) { // making new instance of routineWorkout model routineWorkoutModel _routineWorkoutRetMod = new routineWorkoutModel(); _routineWorkoutRetMod.routineWorkoutID = _routineWorkoutMod.routineWorkoutID; _routineWorkoutRetMod.FK_exerciseID = _routineWorkoutMod.FK_exerciseID; _routineWorkoutRetMod.FK_routineWorkoutID = _routineWorkoutMod.FK_routineWorkoutID; _routineWorkoutRetMod.routineWSets = _routineWorkoutMod.routineWSets; _routineWorkoutRetMod.routineWReps = _routineWorkoutMod.routineWReps; _routineWorkoutRetMod.routineWRest = _routineWorkoutMod.routineWRest; return(_routineWorkoutRetMod); }
// making list of routineWorkout model from routinWorkoutDAO public List <routineWorkoutModel> map(List <routineWorkoutDAO> _dataRoutineWorkout) { // making new list of routineWorkout model List <routineWorkoutModel> _pressRoutineWorkout = new List <routineWorkoutModel>(); foreach (routineWorkoutDAO _dRoutineWorkout in _dataRoutineWorkout) { routineWorkoutModel _pRoutineWorkout = new routineWorkoutModel(); _pRoutineWorkout.routineWorkoutID = _dRoutineWorkout.routineWorkoutID; _pRoutineWorkout.exerciseName = _dRoutineWorkout.exerciseName; _pRoutineWorkout.routineName = _dRoutineWorkout.routineName; _pRoutineWorkout.routineWSets = _dRoutineWorkout.routineWSets; _pRoutineWorkout.routineWReps = _dRoutineWorkout.routineWReps; _pRoutineWorkout.routineWRest = _dRoutineWorkout.routineWRest; _pressRoutineWorkout.Add(_pRoutineWorkout); } return(_pressRoutineWorkout); }
public viewModel() { singleExercise = new exerciseModel(); exerciseList = new List <exerciseModel>(); singleBodyPart = new bodyPartModel(); bodyPartList = new List <bodyPartModel>(); singlePerson = new personModel(); personList = new List <personModel>(); singleRoutine = new routineModel(); routineList = new List <routineModel>(); singleRoutineWorkout = new routineWorkoutModel(); routineWorkoutList = new List <routineWorkoutModel>(); singleRole = new roleModel(); roleList = new List <roleModel>(); singleWeights = new weightsModel(); weightsList = new List <weightsModel>(); }
public weightsModel(routineWorkoutModel routineWorkout) { this.FK_routineWorkID = routineWorkout.routineWorkoutID; }