Exemplo n.º 1
0
 public DisplayProfile(User user, Profile profile, UserImage userImage)
 {
     UserID      = user.UserID;
     Name        = user.Name;
     Joined      = user.CreationDate;
     Dob         = profile.Dob;
     Location    = profile.Location;
     Web         = profile.Web;
     Instagram   = profile.Instagram;
     Facebook    = profile.Facebook;
     Twitter     = profile.Twitter;
     AvatarID    = profile.AvatarID;
     ImageID     = profile.ImageID;
     ShowDetails = profile.ShowDetails;
     if (userImage != null && userImage.IsApproved)
     {
         IsImageApproved = true;
     }
     Points = profile.Points;
 }
Exemplo n.º 2
0
		public DisplayProfile(User user, Profile profile, UserImage userImage)
		{
			UserID = user.UserID;
			Name = user.Name;
			Joined = user.CreationDate;
			Dob = profile.Dob;
			Location = profile.Location;
			Web = profile.Web;
			Aim = profile.Aim;
			YahooMessenger = profile.YahooMessenger;
			Icq = profile.Icq;
			Facebook = profile.Facebook;
			Twitter = profile.Twitter;
			AvatarID = profile.AvatarID;
			ImageID = profile.ImageID;
			ShowDetails = profile.ShowDetails;
			if (userImage != null && userImage.IsApproved)
				IsImageApproved = true;
			Points = profile.Points;
		}
Exemplo n.º 3
0
		public UserImage Get(int userImageID)
		{
			UserImage userImage = null;
			_sqlObjectFactory.GetConnection().Using(connection =>
				connection.Command("SELECT UserImageID, UserID, SortOrder, IsApproved FROM pf_UserImages WHERE UserImageID = @UserImageID")
					.AddParameter("@UserImageID", userImageID)
					.ExecuteReader()
					.ReadOne(r => userImage = new UserImage { UserImageID = r.GetInt32(0), UserID = r.GetInt32(1), SortOrder = r.GetInt32(2), IsApproved = r.GetBoolean(3) }));
			return userImage;
		}