public DataTable GetQuestionnaireQuestionList(long QuestionnaireSectionID, DbTrans trans) {
     QuestionnaireQuestionsLinq lnq = new QuestionnaireQuestionsLinq();
     return lnq.GetDataList("questionnaire_section_id = " + QuestionnaireSectionID, "id", trans.Trans);
 }
 public QuestionnaireQuestionsPara GetQuestionQuestionPara(long QuestionID, DbTrans trans)
 {
     QuestionnaireQuestionsLinq lnq = new QuestionnaireQuestionsLinq();
     return lnq.GetParameter(QuestionID, trans.Trans);
 }
        public bool SaveQuestion(QuestionnaireQuestionsPara para, DbTrans trans, string UserID) {
            bool ret = false;
            QuestionnaireQuestionsLinq lnq = new QuestionnaireQuestionsLinq();
            if (para.ID != 0)
                lnq.GetDataByPK(para.ID, trans.Trans);

            lnq.QUESTIONNAIRE_SECTION_ID = para.QUESTIONNAIRE_SECTION_ID;
            lnq.QUESTION_NAME = para.QUESTION_NAME;
            lnq.CHOICE_TYPE_ID = para.CHOICE_TYPE_ID;
            lnq.QUESTION_POINT = para.QUESTION_POINT;
            lnq.IS_REQUIRE = para.IS_REQUIRE;
            if (lnq.ID != 0)
                ret = lnq.UpdateByPK(UserID, trans.Trans);
            else
                ret = lnq.InsertData(UserID, trans.Trans);

            if (ret == false)
                _err = lnq.ErrorMessage;
            else
                _question_id = lnq.ID;

            return ret;
        }