/// <summary>
        /// Save text question
        /// </summary>
        private void SaveQuestionText()
        {
            //儲存題目
            clsTextQuestion myText          = new clsTextQuestion();
            string          strQTextContent = txtQuestionData.Text;
            string          strATextContent = txtAnswerData.Text;

            strQTextContent = strQTextContent.Replace("&lt;", "<");
            strQTextContent = strQTextContent.Replace("&gt;", ">");
            strATextContent = strATextContent.Replace("&lt;", "<");
            strATextContent = strATextContent.Replace("&gt;", ">");

            myText.saveTextQuestion(strQID, strQTextContent, strATextContent, strUserID, strPaperID, strGroupDivisionID, strGroupID, hiddenQuestionMode.Value);

            //儲存問題難易度
            int iQuestionLevel = AuthoringTool.QuestionEditLevel.QuestionLevel.QuestionLevelName_SELECT_QuestionLevel(ddlQuestionLevel.SelectedValue);

            AuthoringTool.QuestionEditLevel.QuestionLevel.INSERT_QuestionLevel(strQID, iQuestionLevel);

            //儲存問題的病徵
            AuthoringTool.QuestionEditLevel.QuestionLevel.QuestionLevel_INSERT_QuestionSymptoms(strQID, ddlSymptoms.SelectedValue);

            //如果是Specific題目則需儲存一筆資料至Paper_Content
            if (hiddenQuestionMode.Value == "Specific")
            {
                DataReceiver myReceiver    = new DataReceiver();
                int          intContentSeq = myReceiver.getPaperContentMaxSeq(strPaperID) + 1;
                SQLString    mySQL         = new SQLString();
                mySQL.SaveToQuestionContent(strPaperID, strQID, "0", "2", hiddenQuestionMode.Value, intContentSeq.ToString());
            }
        }
        private void btnSaveNextQuestion_ServerClick(object sender, EventArgs e)
        {
            DataReceiver myReceiver = new DataReceiver();

            //儲存題目
            clsTextQuestion myText          = new clsTextQuestion();
            string          strTextQContent = txtQuestionData.Text;
            string          strTextAContent = txtAnswerData.Text;

            strTextQContent = strTextQContent.Replace("&lt;", "<");
            strTextQContent = strTextQContent.Replace("&gt;", ">");
            strTextAContent = strTextAContent.Replace("&lt;", "<");
            strTextAContent = strTextAContent.Replace("&gt;", ">");
            myText.saveTextQuestion(strQID, strTextQContent, strTextAContent, strUserID, strPaperID, strGroupDivisionID, strGroupID, hiddenQuestionMode.Value);

            //儲存問題難易度
            int iQuestionLevel = AuthoringTool.QuestionEditLevel.QuestionLevel.QuestionLevelName_SELECT_QuestionLevel(ddlQuestionLevel.SelectedValue);

            AuthoringTool.QuestionEditLevel.QuestionLevel.INSERT_QuestionLevel(strQID, iQuestionLevel);

            //儲存問題的病徵
            AuthoringTool.QuestionEditLevel.QuestionLevel.QuestionLevel_INSERT_QuestionSymptoms(strQID, ddlSymptoms.SelectedValue);

            //如果是Specific題目則需儲存一筆資料至Paper_Content
            if (hiddenQuestionMode.Value == "Specific")
            {
                int       intContentSeq = myReceiver.getPaperContentMaxSeq(strPaperID) + 1;
                SQLString mySQL         = new SQLString();
                mySQL.SaveToQuestionContent(strPaperID, strQID, "0", "2", hiddenQuestionMode.Value, intContentSeq.ToString());
            }

            //Redirect至此網頁
            //Response.Redirect("Paper_TextQuestionEditor.aspx?Opener=" + hiddenOpener.Value);

            //建立QID
            strQID = strUserID + "_" + myReceiver.getNowTime();

            //清除TextArea
            txtQuestionData.Text = "";
            txtAnswerData.Text   = "";
            string strScript = "<script language='javascript'>\n";

            strScript += "Clear()\n";
            strScript += "</script>\n";
            Page.RegisterStartupScript("Clear", strScript);

            hrQuestion.Style.Add("display", "none");
            hrAnswer.Style.Add("display", "none");
            BulidInterrogation("Question");
            BulidInterrogation("Answer");
        }
        protected void btSaveNew_Click(object sender, EventArgs e)
        {
            //建立QID
            DataReceiver myReceiver = new DataReceiver();

            strQID = strUserID + "_" + myReceiver.getNowTime();

            //儲存題目
            clsTextQuestion myText          = new clsTextQuestion();
            string          strQTextContent = txtQuestionData.Text;
            string          strATextContent = txtAnswerData.Text;

            strQTextContent = strQTextContent.Replace("&lt;", "<");
            strQTextContent = strQTextContent.Replace("&gt;", ">");
            strATextContent = strATextContent.Replace("&lt;", "<");
            strATextContent = strATextContent.Replace("&gt;", ">");

            myText.saveTextQuestion(strQID, strQTextContent, strATextContent, strUserID, strPaperID, strGroupDivisionID, strGroupID, hiddenQuestionMode.Value);

            //儲存問題難易度
            int iQuestionLevel = AuthoringTool.QuestionEditLevel.QuestionLevel.QuestionLevelName_SELECT_QuestionLevel(ddlQuestionLevel.SelectedValue);

            AuthoringTool.QuestionEditLevel.QuestionLevel.INSERT_QuestionLevel(strQID, iQuestionLevel);

            //儲存問題的病徵
            AuthoringTool.QuestionEditLevel.QuestionLevel.QuestionLevel_INSERT_QuestionSymptoms(strQID, ddlSymptoms.SelectedValue);

            //如果是Specific題目則需儲存一筆資料至Paper_Content
            if (hiddenQuestionMode.Value == "Specific")
            {
                int       intContentSeq = myReceiver.getPaperContentMaxSeq(strPaperID) + 1;
                SQLString mySQL         = new SQLString();
                mySQL.SaveToQuestionContent(strPaperID, strQID, "0", "2", hiddenQuestionMode.Value, intContentSeq.ToString());
            }

            //Redirect至下一個網頁
            string strSystemFunction = "";

            if (Session["SystemFunction"] != null)
            {
                strSystemFunction = Session["SystemFunction"].ToString();
            }

            switch (strSystemFunction)
            {
            case "EditPaper":
                Response.Redirect("Paper_OtherQuestion.aspx?Opener=Paper_TextQuestionEditor");
                break;

            case "EditQuestion":
                if (Request.QueryString["QID"] != null)
                {
                    Response.Redirect("Paper_QuestionView.aspx?Opener=Paper_TextQuestionEditor");
                }
                else
                {
                    Response.Redirect("Paper_QuestionMain.aspx?Opener=Paper_TextQuestionEditor");
                }
                break;

            case "PreviewPaper":
                Response.Redirect("Paper_MainPage.aspx?Opener=Paper_TextQuestionEditor");
                break;

            default:
                Response.Redirect("Paper_QuestionMain.aspx?Opener=Paper_TextQuestionEditor");
                break;
            }
        }