Ejemplo n.º 1
0
        // mapping data back to exercise DAO
        public exerciseModel map(exerciseDAO _exerciseMod)
        {
            // making new instance of exercise model
            exerciseModel _exerciseRetMod = new exerciseModel();

            _exerciseRetMod.exerciseID          = _exerciseMod.exerciseID;
            _exerciseRetMod.exerciseName        = _exerciseMod.exerciseName;
            _exerciseRetMod.exerciseDescription = _exerciseMod.exerciseDescription;
            _exerciseRetMod.FK_bodyPart         = _exerciseMod.FK_bodyPart;

            return(_exerciseRetMod);
        }
Ejemplo n.º 2
0
        // making list of exercise model from exerciseDAO
        public List <exerciseModel> map(List <exerciseDAO> _dataExercise)
        {
            // making new list of exercise model
            List <exerciseModel> _pressExercise = new List <exerciseModel>();

            foreach (exerciseDAO _dExercise in _dataExercise)
            {
                exerciseModel _pExercise = new exerciseModel();
                _pExercise.exerciseID          = _dExercise.exerciseID;
                _pExercise.exerciseName        = _dExercise.exerciseName;
                _pExercise.exerciseDescription = _dExercise.exerciseDescription;
                _pExercise.FK_bodyPart         = _dExercise.FK_bodyPart;

                _pressExercise.Add(_pExercise);
            }
            return(_pressExercise);
        }
        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>();
        }