Ejemplo n.º 1
0
        // making list of person model from personDAO
        public List <personModel> map(List <personDAO> _dataPerson)
        {
            // making new list of person model
            List <personModel> _pressPerson = new List <personModel>();

            foreach (personDAO _dPerson in _dataPerson)
            {
                personModel _pPerson = new personModel();
                _pPerson.personID        = _dPerson.personID;
                _pPerson.personFirstName = _dPerson.personFirstName;
                _pPerson.personLastName  = _dPerson.personLastName;
                _pPerson.personAddress   = _dPerson.personAddress;
                _pPerson.personCity      = _dPerson.personCity;
                _pPerson.personState     = _dPerson.personState;
                _pPerson.personZip       = _dPerson.personZip;
                _pPerson.personPhone     = _dPerson.personPhone;
                _pPerson.FK_roleID       = _dPerson.FK_roleID;
                _pPerson.personUsername  = _dPerson.personUsername;
                _pPerson.personPassword  = _dPerson.personPassword;

                _pressPerson.Add(_pPerson);
            }
            return(_pressPerson
                   );
        }
Ejemplo n.º 2
0
        // mapping data back to person DAO
        public personModel map(personDAO _personMod)
        {
            // making new instance of person model
            personModel _personRetMod = new personModel();

            _personRetMod.personID        = _personMod.personID;
            _personRetMod.personFirstName = _personMod.personFirstName;
            _personRetMod.personLastName  = _personMod.personLastName;
            _personRetMod.personAddress   = _personMod.personAddress;
            _personRetMod.personCity      = _personMod.personCity;
            _personRetMod.personState     = _personMod.personState;
            _personRetMod.personZip       = _personMod.personZip;
            _personRetMod.personPhone     = _personMod.personPhone;
            _personRetMod.FK_roleID       = _personMod.FK_roleID;
            _personRetMod.personUsername  = _personMod.personUsername;
            _personRetMod.personPassword  = _personMod.personPassword;


            return(_personRetMod);
        }
        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>();
        }