예제 #1
0
        public JsonResult GetQuestionnaireList(string name, Guid typeId, int pageIndex, int pageSize)
        {
            List <Questionnaire>   list   = null;
            List <QuestionnaireVO> listvo = null;
            JsonResult             result = new JsonResult();
            int count = 0;

            try
            {
                list   = questionnaireService.GetQuestionnaireList(name, typeId, pageIndex, pageSize);
                count  = questionnaireService.GetQuestionnaireCount(name, typeId);
                listvo = Mapper.Map <List <QuestionnaireVO> >(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);
        }