Exemplo n.º 1
0
        public JsonResult GetQuestionTypeList(string typeName, Guid questionnaireTypeID, int pageIndex, int pageSize)
        {
            List <QuestionType>   list   = null;
            List <QuestionTypeVO> listvo = null;
            JsonResult            result = new JsonResult();
            int count = 0;

            try
            {
                list   = questionTypeService.GetQuestionTypeList(typeName, questionnaireTypeID, pageIndex, pageSize);
                count  = questionTypeService.GetQuestionTypeCount(typeName, questionnaireTypeID);
                listvo = Mapper.Map <List <QuestionTypeVO> >(list);
                log.Info("查询成功");
            }
            catch (Exception e)
            {
                log.Error(e.Message);
            }
            finally
            {
                result = Json(new { code = 0, msg = "获取当前站点信息", count = count, data = listvo }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }