예제 #1
0
        private void tsbDel_Click(object sender, EventArgs e)
        {
            string Question = tabConQustion.SelectedTab.Text;

            switch (Question)
            {
            case "单选题":
                QuestionBll.Delete(dataGridView1, Question);
                dataGridView1.DataSource = QuestionBll.QuestionFillDs().Tables[0];
                break;

            case "多选题":
                QuestionBll.Delete(dataGridView2, Question);
                dataGridView2.DataSource = QuestionBll.QuestionFillDs().Tables[1];
                break;

            case "判断题":
                QuestionBll.Delete(dataGridView3, Question);
                dataGridView3.DataSource = QuestionBll.QuestionFillDs().Tables[2];
                break;

            case "填空题":
                QuestionBll.Delete(dataGridView4, Question);
                dataGridView4.DataSource = QuestionBll.QuestionFillDs().Tables[3];
                break;

            case "问答题":
                QuestionBll.Delete(dataGridView5, Question);
                dataGridView5.DataSource = QuestionBll.QuestionFillDs().Tables[4];
                break;

            default:
                break;
            }
        }
예제 #2
0
        protected void btnDelete_Click(object sender, EventArgs e)
        {
            QuestionBll qbll = new QuestionBll();

            qbll.Delete(int.Parse(this.lblQuestionId.Text));
            Response.Redirect("QuestionList.aspx");
        }