コード例 #1
0
 public ActionResult SelectCategory(ScoreboardInputModel scoreboardInputModel)
 {
     if (Session["Login"] == null)
     {
         return(RedirectToAction("", "Login"));
     }
     PrepareNextQuiz(new ScoreModel {
     });
     return(View());
 }
コード例 #2
0
        public ActionResult Scoreboard(ScoreboardInputModel scoreboardInputModel)
        {
            List <ScoreBoardModel> scoreboard    = new List <ScoreBoardModel>();
            ScoreboardContainer    container     = new ScoreboardContainer();
            List <ScoreboardDTO>   scoreboardDTO = container.SelectScoreboardData(Convert.ToString(scoreboardInputModel.selectedDifficulty), Convert.ToInt32(scoreboardInputModel.selectedCategory), Convert.ToString(scoreboardInputModel.selectedTimeSpan));

            foreach (var DTO in scoreboardDTO)
            {
                scoreboard.Add(new ScoreBoardModel(DTO));
            }
            Session["scoreboardList"] = scoreboardDTO;
            return(View());
        }