private bool isDone(int questionNumber)
 {
     if (questionNumber > AllConstants.size)
     {
         AllConstants.flushToDB(HttpContext.Session.GetString("TeamName"));
         return(true);
     }
     return(false);
 }
        public void OnPost()
        {
            var Team = Request.Form["TeamName"].ToString();

            HttpContext.Session.SetString("QuestionNumber", "1");
            HttpContext.Session.SetString("TeamName", Team);
            HttpContext.Session.SetString("Points", "0");

            //Preparing session
            AllConstants.AddSession(Team);

            Response.Redirect("/Quiz");
        }
예제 #3
0
 public IEnumerator <object[]> GetEnumerator() =>
 AllConstants.Select(tuple => new[] { tuple.Key, tuple.Value }).GetEnumerator();