Esempio n. 1
0
 private static void IncrementCommentCount(CommentType type, int ObjID)
 {
     if (type == CommentType.Wall)
     {
         //Do Nothing
     }
     else if (type == CommentType.Video)
     {
         Next2Friends.Data.Video v = Next2Friends.Data.Video.GetVideoByVideoIDWithJoin(ObjID);
         v.NumberOfComments++;
         v.Save();
     }
     else if (type == CommentType.AskAFriend)
     {
         //Do Nothing
     }
     else if (type == CommentType.Blog)
     {
         //Do Nothing
     }
     else if (type == CommentType.Photo)
     {
         Next2Friends.Data.Photo p = Next2Friends.Data.Photo.GetPhotoByPhotoIDWithJoin(ObjID);
         p.NumberOfComments++;
         p.Save();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Parse the Video into a FlashVideoDescriptor
        /// </summary>
        public static FlashVideoDescriptor ParseLive(Next2Friends.Data.Video video)
        {
            FlashVideoDescriptor VideoDescriptor = null;

            if (video != null)
            {
                VideoDescriptor             = new FlashVideoDescriptor();
                VideoDescriptor.IsLive      = false;
                VideoDescriptor.Title       = video.Title;
                VideoDescriptor.Description = video.Description;
                //VideoDescriptor.Duration = video.Duration;
                VideoDescriptor.RecordedDateTime = video.DTCreated.ToLongDateString();
                VideoDescriptor.ThumbnailURL     = video.ThumbnailResourceFile.FullyQualifiedURL;
                VideoDescriptor.ArchivedFLVURL   = video.VideoResourceFile.FullyQualifiedURL;
            }

            return(VideoDescriptor);
        }