public QuestionForm1() { InitializeComponent(); questiondao qd = new questiondao(); q = qd.getQuestionList(); for (int i = 0; i < answer.Length; i++) { answer[i] = null; ChooseNumBox.Items.Add(i); } ABut.Checked = false; LoadQuestion(); }
private void History_Load(object sender, EventArgs e) { questiondao qd = new questiondao(); q = qd.getQuestionList(); historydao hd = new historydao(); h = hd.getHistoryList(username, tpid); for (int i = 0; i < h.Count; i++) { ChooseNumBox.Items.Add(i); } q = new List <Question>(); for (int i = 0; i < h.Count; i++) { Question qu = qd.getQuestion(h[i].questionid); q.Add(qu); } LoadQuestion(); }