コード例 #1
0
 public virtual ActionResult JudgeList(long tournamentId, JudgeListAndCreate model)
 {
     model.NewJudge.GenerateLoginCode();
     model.NewJudge.TournamentId = tournamentId;
     TournamentService.AddJudge(model.NewJudge);
     // By redirecting to GET-method, refresh (F5) works better at client
     Session[IdToHighlightKey] = model.NewJudge.Id;
     return(this.RedirectToAction(MVC.Admin.TournamentAdmin.JudgeList(tournamentId)));
 }
コード例 #2
0
        public virtual ActionResult JudgeList(long tournamentId)
        {
            var tournament = TournamentService.GetTournamentGuarded(tournamentId);
            var model      = new JudgeListAndCreate(tournament);

            model.IdToHighlight       = (long?)Session["IdToHighlight"];
            Session[IdToHighlightKey] = null;
            return(View(model));
        }