public DataTable GetQuestionnaireSectionList(long QuestionnaireID,DbTrans trans) { QuestionnaireSectionLinq lnq = new QuestionnaireSectionLinq(); string sql = ""; sql += "select qs.id, qs.questionnaire_id, qs.section_name, qs.description, qs.section_type_id, "; sql += " st.section_type_name, qs.choice_qty"; sql += " from questionnaire_section qs "; sql += " inner join section_type st on st.id=qs.section_type_id "; sql += " where qs.questionnaire_id = " + QuestionnaireID; sql += " order by qs.id "; return lnq.GetListBySql(sql, trans.Trans); }
public QuestionnaireSectionPara GetQuestionnaireSectionPara(long QuestionnareSectionID, DbTrans trans) { QuestionnaireSectionLinq lnq = new QuestionnaireSectionLinq(); return lnq.GetParameter(QuestionnareSectionID, trans.Trans); }
public bool SaveQuestionnaireSection(QuestionnaireSectionPara para, DbTrans trans, string UserID) { bool ret = false; QuestionnaireSectionLinq lnq = new QuestionnaireSectionLinq(); if (para.ID != 0) lnq.GetDataByPK(para.ID, trans.Trans); lnq.QUESTIONNAIRE_ID = para.QUESTIONNAIRE_ID; lnq.SECTION_NAME = para.SECTION_NAME; lnq.DESCRIPTION = para.DESCRIPTION; lnq.SECTION_TYPE_ID = para.SECTION_TYPE_ID; lnq.CHOICE_QTY = para.CHOICE_QTY; if (lnq.ID != 0) ret = lnq.UpdateByPK(UserID, trans.Trans); else ret = lnq.InsertData(UserID, trans.Trans); if (ret == false) _err = lnq.ErrorMessage; else _questionnaire_section_id = lnq.ID; return ret; }