Exemplo n.º 1
0
 public QuestionFrom(Question s, ExamFrom exfrom, List <QuestionFrom> listQuestionForms, int indexQ)
 {
     InitializeComponent();
     this.question          = s;
     this.exfrom            = exfrom;
     this.listQuestionForms = listQuestionForms;
     lblquestion.Text       = question.content;
     //process Answer
     this.indexQ = indexQ;
     showAnswer();
 }
Exemplo n.º 2
0
        private void txtLogin_Click(object sender, EventArgs e)
        {
            String   examCode = txtExamCode.Text;
            String   user     = txtUser.Text;
            String   pass     = txtPass.Text;
            LoginDAO loginDAO = new LoginDAO();
            Login    login    = loginDAO.getUser(user, pass);

            if (login.pass == null || login.user == null)
            {
                MessageBox.Show("User or pass incorrect");
                return;
            }
            login = loginDAO.getUser(user, pass, examCode);
            if (login.ExamCode == null)
            {
                MessageBox.Show("Exam Code incorrect");
                return;
            }

            ExamFrom exForm = new ExamFrom(login);

            exForm.Show();
        }