示例#1
0
        public static UserCustom MapUserCus(User user)
        {
            UserCustom userCus = new UserCustom();

            userCus.users_id     = user.users_id;
            userCus.born         = user.born;
            userCus.name         = user.name;
            userCus.user_address = user.user_address;
            userCus.phone        = user.phone;
            userCus.acc          = user.acc;
            userCus.pass         = user.pass;
            userCus.user_role    = user.user_role;
            return(userCus);
        }
示例#2
0
        public static User MapUser(UserCustom userCus)
        {
            User user = new User();

            user.users_id     = userCus.users_id;
            user.name         = userCus.name;
            user.born         = Convert.ToDateTime(userCus.Born);
            user.user_address = userCus.user_address;
            user.phone        = userCus.phone;
            user.acc          = userCus.acc;
            user.pass         = userCus.pass;
            user.user_role    = userCus.Role == "Quản trị" ? 1 : 0;
            return(user);
        }