Example #1
0
        // making list of role model from rolesDAO
        public List <roleModel> map(List <rolesDAO> _dataRoles)
        {
            // making new list of role model
            List <roleModel> _pressRoles = new List <roleModel>();

            foreach (rolesDAO _dRoles in _dataRoles)
            {
                roleModel _pRoles = new roleModel();
                _pRoles.roleID          = _dRoles.roleID;
                _pRoles.roleName        = _dRoles.roleName;
                _pRoles.roleDescription = _dRoles.roleDescription;

                _pressRoles.Add(_pRoles);
            }
            return(_pressRoles);
        }
        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>();
        }