Ejemplo n.º 1
0
        private void BtnBUQuestion_Click(object sender, RoutedEventArgs e)
        {
            DecodeQuestion decodeQuestion = DAO.BUDecodeQuestionDAO.Instance.getQuestion(currentRow, currentCol);

            eWDecode.txtBlockQuestion2.Text = eWDecode.txtBlockQuestion1.Text = txtBlockQuestion.Text = decodeQuestion.Detail;
            mediaAct.Upload(eWDecode.imgQuestion, decodeQuestion.QuestionImageName);
            mediaAct.Upload(eWDecode.videoQuestion, decodeQuestion.QuestionVideoName);
            txtBlockAnswer.Text = decodeQuestion.Answer;

            if (decodeQuestion.QuestionImageName == "" && decodeQuestion.QuestionVideoName == "")
            {
                eWDecode.txtBlockQuestion1.Text = "";
            }
            else
            {
                eWDecode.txtBlockQuestion2.Text = "";
            }

            eWDecode.HideAll();
            eWDecode.gridQuestion.Visibility = Visibility.Visible;
            mediaAct.Play(eWDecode.videoQuestionStart);

            ResetAnswerList();
            ResetTxtBlockAnswerAndPoint();

            for (int i = 0; i < server.ClientList.Count; i++)
            {
                server.Send(server.ClientList[i], "5_1_" + decodeQuestion.Detail);
            }
        }
Ejemplo n.º 2
0
        public DecodeQuestion getQuestion(int row, int col, string matchID, int isBackup = 0)
        {
            string         query  = string.Format(@"
                           SELECT * FROM tblDECODEQUESTION
                           WHERE row = {0} AND col = {1} AND matchID = '{2}' AND isBackup = {3}", row + 1, col + 1, matchID, isBackup);
            DataTable      data   = DataProvider.Instance.ExecuteQuery(query);
            DecodeQuestion result = new DecodeQuestion(data.Rows[0]);

            return(result);
        }
Ejemplo n.º 3
0
        public DecodeQuestion getQuestion(int row, int col)
        {
            string         query  = string.Format(@"
                           SELECT * FROM DECODEQUESTION
                           WHERE Row = {0} AND Col = {1}", row + 1, col + 1);
            DataTable      data   = DataProvider.Instance.ExecuteQuery(query);
            DecodeQuestion result = new DecodeQuestion(data.Rows[0]);

            return(result);
        }