示例#1
0
        public EditModel(WumpWeb.Models.ScoreContext context)
        {
            _context = context;
            string fileContent;

            using (var reader = System.IO.File.OpenText("scoring_rubric.json")) {
                fileContent = reader.ReadToEnd();
            }
            var config = JObject.Parse(fileContent);

            foreach (var item in config["judges"])
            {
                judges.Add(item["name"].ToString());
            }
            foreach (var item in config["teams"])
            {
                teams.Add(item["name"].ToString());
            }
            foreach (var item in config["judging_criteria"])
            {
                var qna = new QuestionAndAnswers(item);
                if (!category_qna.ContainsKey(qna.question.category))
                {
                    category_qna.Add(qna.question.category, new List <QuestionAndAnswers>());
                }
                category_qna[qna.question.category].Add(qna);
            }
        }
示例#2
0
 public DetailsModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }
示例#3
0
 public IndexModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }
示例#4
0
 public DeleteModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }
示例#5
0
 public CreateModel(WumpWeb.Models.ScoreContext context)
 {
     _context = context;
 }