public BusinessLogicUsers MapUser(DataAccessUsers dUser)
        {
            BusinessLogicUsers bUser = new BusinessLogicUsers();

            bUser.User_ID   = dUser.User_ID;
            bUser.FirstName = dUser.FirstName;
            bUser.LastName  = dUser.LastName;
            bUser.Age       = dUser.Age;
            bUser.Gender    = dUser.Gender;
            bUser.Email     = dUser.Email;
            bUser.Username  = dUser.Username;
            bUser.Password  = dUser.Password;
            bUser.House_ID  = dUser.House_ID;
            bUser.Role_ID   = dUser.Role_ID;
            return(bUser);
        }
        public DataAccessUsers MapUser(BusinessLogicUsers bUser)
        {
            DataAccessUsers dUser = new DataAccessUsers();

            dUser.User_ID   = bUser.User_ID;
            dUser.FirstName = bUser.FirstName;
            dUser.LastName  = bUser.LastName;
            dUser.Age       = bUser.Age;
            dUser.Gender    = bUser.Gender;
            dUser.Email     = bUser.Email;
            dUser.Username  = bUser.Username;
            dUser.Password  = _businessLogic.HashPassword(bUser.Password);
            dUser.House_ID  = bUser.House_ID;
            dUser.Role_ID   = bUser.Role_ID;
            return(dUser);
        }
Esempio n. 3
0
        public Users MapUser(BusinessLogicUsers bUser)
        {
            Users user = new Users();

            user.User_ID   = bUser.User_ID;
            user.FirstName = bUser.FirstName;
            user.LastName  = bUser.LastName;
            user.Age       = bUser.Age;
            user.Gender    = bUser.Gender;
            user.Email     = bUser.Email;
            user.Username  = bUser.Username;
            user.Password  = bUser.Password;
            user.House_ID  = bUser.House_ID;
            user.Role_ID   = bUser.Role_ID;
            return(user);
        }
Esempio n. 4
0
        public Users MapUser(BusinessLogicUsers bUser)
        {
            if (bUser == null)
            {
                return(null);
            }
            Users user = new Users
            {
                User_ID   = bUser.User_ID,
                FirstName = bUser.FirstName,
                LastName  = bUser.LastName,
                Age       = bUser.Age,
                Gender    = bUser.Gender,
                Email     = bUser.Email,
                Username  = bUser.Username,
                Password  = bUser.Password,
                House_ID  = bUser.House_ID,
                Role_ID   = bUser.Role_ID
            };

            return(user);
        }
Esempio n. 5
0
        public BusinessLogicUsers MapUser(DataAccessUsers dUser)
        {
            if (dUser == null)
            {
                return(null);
            }
            BusinessLogicUsers bUser = new BusinessLogicUsers
            {
                User_ID   = dUser.User_ID,
                FirstName = dUser.FirstName,
                LastName  = dUser.LastName,
                Age       = dUser.Age,
                Gender    = dUser.Gender,
                Email     = dUser.Email,
                Username  = dUser.Username,
                Password  = dUser.Password,
                House_ID  = dUser.House_ID,
                Role_ID   = dUser.Role_ID,
            };

            return(bUser);
        }
Esempio n. 6
0
        public DataAccessUsers MapUser(BusinessLogicUsers bUser)
        {
            if (bUser == null)
            {
                return(null);
            }
            DataAccessUsers dUser = new DataAccessUsers
            {
                User_ID   = bUser.User_ID,
                FirstName = bUser.FirstName,
                LastName  = bUser.LastName,
                Age       = bUser.Age,
                Gender    = bUser.Gender,
                Email     = bUser.Email,
                Username  = bUser.Username,
                Password  = _businessLogic.HashPassword(bUser.Password),
                House_ID  = bUser.House_ID,
                Role_ID   = bUser.Role_ID
            };

            return(dUser);
        }
Esempio n. 7
0
 public void UpdateUser(int userId, BusinessLogicUsers bUser)
 {
     _userDataAccess.UpdateUser(userId, _userMapper.MapUser(bUser));
 }
Esempio n. 8
0
 public void AddUser(BusinessLogicUsers bUser)
 {
     _userDataAccess.AddUser(_userMapper.MapUser(bUser));
 }