Esempio n. 1
0
        public ActionResult ManageVideos()
        {
            mu = Membership.GetUser();

            UserAccountVideos uavs = new UserAccountVideos();
            uavs.GetVideosForUserAccount(Convert.ToInt32(mu.ProviderUserKey), 'U');

            if (uavs.Count > 0)
            {
                Videos favvids = new Videos();
                Video f1 = new Video();

                foreach (UserAccountVideo uav1 in uavs)
                {
                    f1 = new Video(uav1.VideoID);
                    if (f1.IsEnabled) favvids.Add(f1);
                }

                SongRecord sng1 = null;
                SongRecords sngrcds2 = new SongRecords();

                foreach (Video v1 in favvids)
                {
                    sng1 = new SongRecord(v1);
                    sngrcds2.Add(sng1);
                }

                sngrcds2.IsUserSelected = true;
                sngrcds2.EnableChangeOrder = false;

                ViewBag.UserUploaded = sngrcds2.VideoPlaylist();
            }

            return View(uavs);
        }
Esempio n. 2
0
        public ActionResult ManageVideos()
        {
            var uavs = new UserAccountVideos();
            if (_mu != null) uavs.GetVideosForUserAccount(Convert.ToInt32(_mu.ProviderUserKey), 'U');

            if (uavs.Count > 0)
            {
                var favvids = new Videos();
                favvids.AddRange(uavs.Select(uav1 => new Video(uav1.VideoID)).Where(f1 => f1.IsEnabled));

                var sngrcds2 = new SongRecords();
                sngrcds2.AddRange(favvids.Select(v1 => new SongRecord(v1)));

                sngrcds2.IsUserSelected = true;
                sngrcds2.EnableChangeOrder = false;

                ViewBag.UserUploaded = sngrcds2.VideoPlaylist();
            }

            return View(uavs);
        }
Esempio n. 3
0
        public ActionResult ManageVideos(NameValueCollection nvc)
        {
            mu = Membership.GetUser();
            ua = new UserAccount(Convert.ToInt32(mu.ProviderUserKey));
            ViewBag.UserName = ua.UserName;

            UserAccountVideos plyvids = new UserAccountVideos();
            plyvids.GetVideosForUserAccount(ua.UserAccountID, 'U');

            nvc = Request.Form;

            //video_delete_id
            //video_down_id
            //video_up_id

            if (nvc["video_delete_id"] != null)
            {
                UserAccountVideo.DeleteVideoForUser(ua.UserAccountID, Convert.ToInt32(nvc["video_delete_id"]));
            }

            return View("ManageVideos");
        }
Esempio n. 4
0
        public ActionResult ManageVideos(NameValueCollection nvc)
        {
            if (nvc == null) throw new ArgumentNullException("nvc");

            if (_mu != null) _ua = new UserAccount(Convert.ToInt32(_mu.ProviderUserKey));
            ViewBag.UserName = _ua.UserName;

            var plyvids = new UserAccountVideos();
            plyvids.GetVideosForUserAccount(_ua.UserAccountID, 'U');

            nvc = Request.Form;

            if (nvc["video_delete_id"] != null)
            {
                UserAccountVideo.DeleteVideoForUser(_ua.UserAccountID, Convert.ToInt32(nvc["video_delete_id"]));
            }

            return View("ManageVideos");
        }