示例#1
0
        /// <summary>
        /// 若使用者有新增選項,會將新增的選項暫存在"new_Selection_DataRow"資料列中,等到下次網頁PostBack時在處理
        /// </summary>
        /// <param name="QID">問題ID</param>
        /// <param name="new_selectionID">新增的選項ID</param>
        public void add_new_selection(string QID, string new_SelectionID)
        {
            DataRow new_Selection_DataRow = this.QuestionSelectionIndex.NewRow();

            new_Selection_DataRow["cQID"]         = QID;
            new_Selection_DataRow["cSelectionID"] = new_SelectionID;
            new_Selection_DataRow["sSeq"]         = CommonQuestionUtility.GetMaxSequence(QID, QuestionSelectionIndex, qAccessor.QuestionLinkQID);
            new_Selection_DataRow["cSelection"]   = "";
            new_Selection_DataRow["bCaseSelect"]  = false;
            QuestionSelectionIndex.Rows.Add(new_Selection_DataRow);
        }
示例#2
0
        /// <summary>
        /// 新增父問題後面的後續問題
        /// </summary>
        /// <param name="QID">問題ID</param>
        /// <param name="new_Sub_QID">要新增後續問題的ID</param>
        public void add_New_Sub_Question(string QID, string new_Sub_QID, int intLevel)
        {
            //新增資料到QuestionIndex
            DataRow new_Sub_QID_DataRow = this.QuestionIndex.NewRow();

            new_Sub_QID_DataRow["cQID"]      = new_Sub_QID;
            new_Sub_QID_DataRow["cQuestion"] = "";
            new_Sub_QID_DataRow["sLevel"]    = intLevel;
            QuestionIndex.Rows.Add(new_Sub_QID_DataRow);
            //新增資料到QuestionLinkQID
            new_Sub_QID_DataRow = this.QuestionLinkQID.NewRow();
            new_Sub_QID_DataRow["cParentQID"] = QID;
            new_Sub_QID_DataRow["cSubQID"]    = new_Sub_QID;
            new_Sub_QID_DataRow["sSeq"]       = CommonQuestionUtility.GetMaxSequence(QID, qsAccessor.QuestionSelectionIndex, QuestionLinkQID);
            QuestionLinkQID.Rows.Add(new_Sub_QID_DataRow);
        }
示例#3
0
        /// <summary>
        /// 新增父問題後面的後續問題
        /// </summary>
        /// <param name="QID">問題ID</param>
        /// <param name="new_Sub_QID">要新增後續問題的ID</param>
        public void add_New_Sub_Question(string QID, string new_Sub_QID, int intLevel, string question_type, string case_id)
        {
            //新增資料到QuestionIndex
            DataRow new_Sub_QID_DataRow = this.QuestionIndex.NewRow();

            new_Sub_QID_DataRow["cQID"]      = new_Sub_QID;
            new_Sub_QID_DataRow["cQuestion"] = "";
            new_Sub_QID_DataRow["sLevel"]    = intLevel;
            QuestionIndex.Rows.Add(new_Sub_QID_DataRow);
            //新增資料到QuestionLinkQID
            new_Sub_QID_DataRow = this.QuestionLinkQID.NewRow();
            new_Sub_QID_DataRow["cParentQID"] = QID;
            new_Sub_QID_DataRow["cSubQID"]    = new_Sub_QID;
            new_Sub_QID_DataRow["sSeq"]       = CommonQuestionUtility.GetMaxSequence(QID, qsAccessor.QuestionSelectionIndex, QuestionLinkQID);
            QuestionLinkQID.Rows.Add(new_Sub_QID_DataRow);
            //新增資料到SubQuestionMap
            try {
                string strSQL = "INSERT INTO SubQuestionMap VALUES('" + case_id + "','" + QID + "','" + new_Sub_QID + "')";
                sqldb.ExecuteNonQuery(strSQL);
            }
            catch { }
        }