Example #1
0
        private void E_OnAnswerSelected(object sender, int IDCheck)
        {
            AdminViewQuestions.OnlyOneFromSql(AdminViewQuestions.AdminQuestions[question].QuestionID);

            //EditQuestion(IDCheck);

            AnswerCorrect = IDCheck;
        }
Example #2
0
        private void gridViewQuestions_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            adminManageQuestions.btnEditQuestion.Visible   = true;
            adminManageQuestions.btnDeleteQuestion.Visible = true;
            adminManageQuestions.adminQuestionNewEdit.Hide();
            adminManageQuestions.adminQuestionCtrl.Show();

            gridViewQuestions.Hide();

            adminManageQuestions.Show();

            AdminViewQuestions.OnlyOneFromSql(Convert.ToInt32(gridViewQuestions.Rows[e.RowIndex].Cells["Question ID"].Value));

            adminManageQuestions.adminQuestionCtrl.Update();

            adminManageQuestions.btnEditQuestion.TabIndex = Convert.ToInt32(gridViewQuestions.Rows[e.RowIndex].Cells["Question ID"].Value);
        }
Example #3
0
        private void btnSaveEditQuestion_Click(object sender, EventArgs e)
        {
            btnBackView.Visible = true;

            btnBackEdit.Visible = false;

            btnEditQuestion.Visible = true;

            adminQuestionNewEdit.EditQuestion(btnEditQuestion.TabIndex, adminQuestionNewEdit.txtQuestion.Text, adminQuestionNewEdit.txtEditAnswer1.Text, adminQuestionNewEdit.txtEditAnswer2.Text, adminQuestionNewEdit.txtEditAnswer3.Text, adminQuestionNewEdit.txtEditAnswer4.Text, ExamQuestionsNewEdit.AnswerCorrect);

            adminQuestionNewEdit.Hide();

            AdminViewQuestions.OnlyOneFromSql(Convert.ToInt32(btnEditQuestion.TabIndex));

            adminQuestionCtrl.Update();

            adminQuestionCtrl.txtQuestion.ReadOnly = true;

            btnSaveEditQuestion.Visible = false;
        }