Esempio n. 1
0
        public UserDAO SingleUserMap(UserPO UserToMap)
        {
            UserDAO UserToReturn = new UserDAO();

            {
                UserDAO UserToView = new UserDAO();
                UserToView.UserID            = UserToMap.UserID;
                UserToView.Username          = UserToMap.Username;
                UserToView.Password          = UserToMap.Password;
                UserToView.FirstName         = UserToMap.FirstName;
                UserToView.LastName          = UserToMap.LastName;
                UserToView.Email             = UserToMap.Email;
                UserToView.FavoritePokemon   = UserToMap.FavoritePokemon;
                UserToView.FavoritePokemonID = UserToMap.FavoritePokemonID;
                UserToView.FavoriteType      = UserToMap.FavoriteType;
                UserToView.FavoriteTypeID    = UserToMap.FavoriteTypeID;
                UserToView.GroupOneName      = UserToMap.GroupOneName;
                UserToView.GroupOneID        = UserToMap.GroupOneID;
                UserToView.GroupTwoName      = UserToMap.GroupTwoName;
                UserToView.GroupTwoID        = UserToMap.GroupTwoID;
                UserToView.GroupThreeName    = UserToMap.GroupThreeName;
                UserToView.GroupThreeID      = UserToMap.GroupThreeID;
                UserToView.RoleName          = UserToMap.RoleName;
                UserToView.RoleID            = UserToMap.RoleID;
                UserToReturn = UserToView;
            }
            return(UserToReturn);
        }
Esempio n. 2
0
        public List <UserPO> UserMap(List <UserDAO> UserListToMap)
        {
            List <UserPO> UserListToReturn = new List <UserPO>();

            foreach (UserDAO UserToMap in UserListToMap)
            {
                UserPO UserToView = new UserPO();
                UserToView.UserID            = UserToMap.UserID;
                UserToView.Username          = UserToMap.Username;
                UserToView.Password          = UserToMap.Password;
                UserToView.FirstName         = UserToMap.FirstName;
                UserToView.LastName          = UserToMap.LastName;
                UserToView.Email             = UserToMap.Email;
                UserToView.FavoritePokemon   = UserToMap.FavoritePokemon;
                UserToView.FavoritePokemonID = UserToMap.FavoritePokemonID;
                UserToView.FavoriteType      = UserToMap.FavoriteType;
                UserToView.FavoriteTypeID    = UserToMap.FavoriteTypeID;
                UserToView.GroupOneName      = UserToMap.GroupOneName;
                UserToView.GroupOneID        = UserToMap.GroupOneID;
                UserToView.GroupTwoName      = UserToMap.GroupTwoName;
                UserToView.GroupTwoID        = UserToMap.GroupTwoID;
                UserToView.GroupThreeName    = UserToMap.GroupThreeName;
                UserToView.GroupThreeID      = UserToMap.GroupThreeID;
                UserToView.RoleName          = UserToMap.RoleName;
                UserToView.RoleID            = UserToMap.RoleID;
                UserListToReturn.Add(UserToView);
            }
            return(UserListToReturn);
        }
 public UserViewModel()
 {
     SingleUser = new UserPO();
     UserList   = new List <UserPO>();
 }