Exemplo n.º 1
0
        public ActionResult Contest(string key)
        {
            _contest = new Contest();
            _contest.GetContestByKey(key);
            var convids = new ContestVideos();
            convids.GetContestVideosForContest(_contest.ContestID);
            ViewBag.ContestName = _contest.Name;
            var sngrcs = new SongRecords();
            sngrcs.AddRange(convids.Select(vi => new Video(vi.VideoID)).Select(vidCon => new SongRecord(vidCon)));
            sngrcs.Sort((p1, p2) => p2.VideoID.CompareTo(p1.VideoID));

            return View(sngrcs);
        }
Exemplo n.º 2
0
        public ActionResult VideoVote()
        {
            Contest contest = Contest.GetLastContest();

            ViewBag.Contest = contest;

            if (_mu != null &&
                (ContestVideo.IsUserContestVoted(Convert.ToInt32(_mu.ProviderUserKey), contest.ContestID) &&
                 contest.DeadLine.AddHours(72) > DateTime.UtcNow))
            {
                LoadContestResults();

                return View();
            }

            var cvids = new ContestVideos();

            cvids.GetContestVideosForContest(contest.ContestID);

            var vidsInContest = new Videos();
            vidsInContest.AddRange(cvids.Select(cv1 => new Video(cv1.VideoID)));

            vidsInContest.Sort((p1, p2) => p1.PublishDate.CompareTo(p2.PublishDate));

            ViewBag.ContestVideos = vidsInContest;

            return View();
        }
Exemplo n.º 3
0
        public ActionResult Index()
        {
            int randomVideo = Video.RandomVideoIDVideo();

            if (randomVideo > 0)
            {
                var randomVid = new Video(randomVideo);
                ViewBag.NewestVideo = randomVid.ProviderKey;
            }

            LoadUserBandViewBag();

            LoadFilteredVideos(false);

            Contest cndss = Lib.BOL.VideoContest.Contest.GetCurrentContest();
            var cvids = new ContestVideos();
            var vidsInContest = new Videos();
            vidsInContest.AddRange(cvids.Select(cv1 => new Video(cv1.VideoID)));
            vidsInContest.Sort((p1, p2) => p2.PublishDate.CompareTo(p1.PublishDate));
            var sngrcds3 = new SongRecords();
            sngrcds3.AddRange(vidsInContest.Select(v1 => new SongRecord(v1)));

            ViewBag.ContestVideoList = sngrcds3.VideosList();
            ViewBag.CurrentContest = cndss;
            ViewBag.VideoTypes = GetVideoTypes();
            ViewBag.PersonTypes = GetPersonTypes();
            ViewBag.FootageTypes = GetFootageTypes();

            return View();
        }