Example #1
0
        public bool RandomSurveyMain(string string_0)
        {
            List <SurveyRandom> list = new List <SurveyRandom>();

            list = oSurveyRandomBaseDal.GetGroupInfo();
            int num = 0;

            foreach (SurveyRandom item in list)
            {
                List <SurveyRandom> list2 = new List <SurveyRandom>();
                list2 = oSurveyRandomBaseDal.GetList(item.QUESTION_SET);
                num  += item.RANDOM_INDEX;
                oSurveyRandomDal.AddList(string_0, list2);
            }
            Thread.Sleep(2000);
            bool result = CheckBaseCopyOK(string_0, num);

            foreach (SurveyRandom item2 in list)
            {
                SurveyDefine byPageId = oSurveyDefineDal.GetByPageId(item2.QUESTION_SET, 0);
                if (byPageId.IS_RANDOM == 1)
                {
                    RandomIndex(string_0, item2.QUESTION_SET);
                }
            }
            return(result);
        }
Example #2
0
        public void Init(string string_0, int int_0, bool GetDetail = true)
        {
            QInitDateTime = DateTime.Now;
            string _003F40_003F = "";

            QDefine      = oSurveyDefineDal.GetByPageId(string_0, int_0);
            QuestionName = QDefine.QUESTION_NAME;
            ParentCode   = QDefine.PARENT_CODE;
            if (QDefine.DETAIL_ID != "" && GetDetail)
            {
                if (QDefine.PARENT_CODE == "" || int_0 == 0)
                {
                    QDetails  = oSurveyDetailDal.GetDetails(QDefine.DETAIL_ID, out _003F40_003F);
                    OtherCode = _003F40_003F;
                }
                else if (!(QDefine.PARENT_CODE == "DYNAMIC") && int_0 > 0)
                {
                    QDetails = oSurveyDetailDal.GetList(QDefine.DETAIL_ID, QDefine.PARENT_CODE);
                }
            }
        }