Exemple #1
0
        private void Btndetail_Click(object sender, EventArgs e)
        {
            SheetDTO  sheet  = (sender as Button).Tag as SheetDTO;
            string    query  = $"select codetest from SHEET_ANSWER where userID='{sheet.userID}' and examID='{sheet.examID}' and courseID='{sheet.courseID}'";
            DataTable result = DataProvider.Instance.ExecuteQuery(query);

            string codeexam = result.Rows[0]["codeTest"].ToString();
            FTest1 f        = new FTest1(codeexam, UserDTO.Instance.examSelected.courseID, UserDTO.Instance.examSelected.examID, sheet.userID, true);

            f.Show();
        }
Exemple #2
0
        private void btnDo_Click(object sender, EventArgs e)
        {
            Random random = new Random();

            try
            {
                List <TestDTO> lst = TestDAO.Instance.getListTestByExamID_courseID(UserDTO.Instance.examSelected.examID, UserDTO.Instance.examSelected.courseID);

                string codeexam = lst[random.Next(0, lst.Count)].code;
                FTest1 f        = new FTest1(codeexam, UserDTO.Instance.examSelected.courseID, UserDTO.Instance.examSelected.examID, UserDTO.Instance.userID, false);
                btnDo.Visible = false;
                f.ShowDialog();
                CheckStatusReview();
            }
            catch (Exception a)
            {
                MessageBox.Show(a.ToString());
            }
        }