private void LoadQuestionID(string ExamCode) { CilientModel CModel = new CilientModel(); qID = CModel.GetQuestionByExam(ExamCode); foreach (var item in qID) { listQuestion.Items.Add(item); } }
private void LoadQuestion() { ListQuestion = new List <Question>(); CilientModel CModel = new CilientModel(); foreach (var item in qID) { listQuestion.Add(CModel.GetQuestionByID(item)); } }
private void btnLoginTest_Click(object sender, EventArgs e) { string user = txtUserNameTest.Text; string pass = txtPassWordTest.Text; CilientModel CModel = new CilientModel(); if (CModel.CheckLogin(user, pass) == true) { if (CModel.CheckExam(txtExamCodeTest.Text)) { this.Hide(); } else { MessageBox.Show("Exam not started"); } } else { MessageBox.Show("Login Fail"); } }