예제 #1
0
        public ProfileModel(User user)
        {
            this.id = user.id;
            this.birthDate = user.birthDate;
            this.description = user.description;
            //this.status = user.status;
            this.graduationDate = user.graduationDate;
            this.email = user.email;
            this.firstName = user.firstName;
            this.lastName = user.lastName;
            this.title = user.title;
            this.location = user.location;
            this.major = user.major;
            this.phoneNumber = user.phoneNumber;
            this.school = user.organization;
            this.userName = user.userName;
            //this.willingToRelocate = user.willingToRelocate;
            this.profilePicture = user.profilePicture;
            this.profilePictureThumbnail = user.profilePictureThumbnail;
            this.aboutPicture = user.aboutPicture;
            this.aboutPictureThumbnail = user.aboutPictureThumbnail;
            this.projects = new List<ProjectModel>();
            this.profileURL = user.profileURL;
            this.projectOrder = user.projectOrder;
            TagManager tm = new TagManager();
            this.userTags = tm.getAllUserTags(this.id);
            if(user.projects != null)
            {
                foreach (Project project in user.projects)
                {
                    if (project.isActive)
                    {
                        this.projects.Add(new ProjectModel(project));
                    }
                }
            }

            this.resume = user.resume;
            this.emailVerified = user.emailVerified;
            this.isPublic = user.isPublic;
            this.isActive = user.isActive;
            //this.visibleProject = "project0";
        }