Beispiel #1
0
        public ActionResult Contest(string key)
        {
            contest = new Contest();

            contest.GetContestByKey(key);

            ContestVideos convids = new ContestVideos();

            convids.GetContestVideosForContest(contest.ContestID);

            ViewBag.ContestName = contest.Name;

            SongRecords sngrcs = new SongRecords();
            SongRecord sngrcd = null;
            BootBaronLib.AppSpec.DasKlub.BOL.Video vidCon = null;

            foreach (BootBaronLib.AppSpec.DasKlub.BOL.VideoContest.ContestVideo vi in convids)
            {
                vidCon = new BootBaronLib.AppSpec.DasKlub.BOL.Video(vi.VideoID);

                sngrcd = new SongRecord(vidCon);

                sngrcs.Add(sngrcd);
            }

            sngrcs.Sort(delegate(BootBaronLib.AppSpec.DasKlub.BOL.ArtistContent.SongRecord p1,
            BootBaronLib.AppSpec.DasKlub.BOL.ArtistContent.SongRecord p2)
            {
                return p2.VideoID.CompareTo(p1.VideoID);
            });

            return View(sngrcs);
        }
Beispiel #2
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);
        }