Example #1
0
        private void btnConfirm_Click(object sender, EventArgs e)
        {
            string          examCode        = txtExamCode.Text;
            ExamineeTakeBLL examineeTakeBLL = new ExamineeTakeBLL();
            ExamineeTake    examineeTake    = examineeTakeBLL.GetExamineeTakeInfo(examCode);

            if (examineeTake != null)
            {
                examineeTakeBLL.SetExamineeTakeChildInfo(examineeTake);

                Thread thread = new Thread(() =>
                {
                    //FrmExam frmExam = new FrmExam();
                    //frmExam.ExamineeTakeInfo = examineeTake;
                    //Application.Run(frmExam);
                    Application.Run(new FrmExam(examineeTake));
                });
                thread.SetApartmentState(ApartmentState.STA);
                thread.Start();

                this.Close();
            }
            else
            {
                lblStatus.Text = "  Invalid Exam Code!";
            }
        }