Ejemplo n.º 1
0
        public void SaveVideo(int videoAlbumId, string videoUrl)
        {
            var videoAlbum = _customerVideoAlbumService.GetCustomerVideoAlbumById(videoAlbumId);


            if (videoAlbum.Videos.Count >= _mobSocialSettings.MaximumMainAlbumVideos)
            {
                throw new ApplicationException("You may only upload up to " + _mobSocialSettings.MaximumMainAlbumVideos +
                                               " videos at this time.");
            }


            var video = new CustomerVideo()
            {
                VideoAlbum           = videoAlbum,
                CustomerVideoAlbumId = videoAlbumId,
                DateCreated          = DateTime.Now,
                DisplayOrder         = 0,
                VideoUrl             = videoUrl
            };

            _customerVideoAlbumService.Insert(video);
        }
Ejemplo n.º 2
0
 public void Update(CustomerVideo video)
 {
     _customerVideoRepository.Update(video);
 }
Ejemplo n.º 3
0
 public void Insert(CustomerVideo customerVideo)
 {
     _customerVideoRepository.Insert(customerVideo);
 }
Ejemplo n.º 4
0
 public void Delete(CustomerVideo customerVideo)
 {
     _customerVideoRepository.Delete(customerVideo);
 }
        public void SaveVideo(int videoAlbumId, string videoUrl)
        {
            var videoAlbum = _customerVideoAlbumService.GetCustomerVideoAlbumById(videoAlbumId);

            if (videoAlbum.Videos.Count >= _mobSocialSettings.MaximumMainAlbumVideos)
                throw new ApplicationException("You may only upload up to " + _mobSocialSettings.MaximumMainAlbumVideos +
                                               " videos at this time.");

            var video = new CustomerVideo()
                {
                    VideoAlbum = videoAlbum,
                    CustomerVideoAlbumId = videoAlbumId,
                    DateCreated = DateTime.Now,
                    DisplayOrder = 0,
                    VideoUrl = videoUrl
                };

            _customerVideoAlbumService.Insert(video);
        }