Пример #1
0
        // mapping data to routine model
        public routineDAO map(routineModel _routineMod)
        {
            // making new instance of routine dao
            routineDAO _routineRetMod = new routineDAO();

            _routineRetMod.routineID     = _routineMod.routineID;
            _routineRetMod.routineName   = _routineMod.routineName;
            _routineRetMod.FK_personID   = _routineMod.FK_personID;
            _routineRetMod.login         = _routineMod.login;
            _routineRetMod.totalSets     = _routineMod.totalSets;
            _routineRetMod.totalReps     = _routineMod.totalReps;
            _routineRetMod.totalExercise = _routineMod.totalExercise;

            return(_routineRetMod);
        }
Пример #2
0
        // making list of routine model from routineDAO
        public List <routineModel> map(List <routineDAO> _dataRoutine)
        {
            // making new list of routine model
            List <routineModel> _pressRoutine = new List <routineModel>();

            foreach (routineDAO _dRoutine in _dataRoutine)
            {
                routineModel _pRoutine = new routineModel();
                _pRoutine.routineID     = _dRoutine.routineID;
                _pRoutine.routineName   = _dRoutine.routineName;
                _pRoutine.FK_personID   = _dRoutine.FK_personID;
                _pRoutine.login         = _dRoutine.login;
                _pRoutine.totalSets     = _dRoutine.totalSets;
                _pRoutine.totalReps     = _dRoutine.totalReps;
                _pRoutine.totalExercise = _dRoutine.totalExercise;

                _pressRoutine.Add(_pRoutine);
            }
            return(_pressRoutine);
        }
        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>();
        }