コード例 #1
0
        public JsonResult GetQuestionnaireByTypeId(Guid id)
        {
            Questionnaire obj    = null;
            JsonResult    result = new JsonResult();

            try
            {
                if (id == null && id == Guid.Empty)
                {
                    result = Json(new { code = 1, msg = "问卷类型不存在", data = id }, JsonRequestBehavior.AllowGet);
                }
                obj = questionnaireService.GetQuestionnaireByTypeId(id);
            }
            catch (Exception e)
            {
            }
            finally
            {
                result = Json(new { code = 0, msg = "成功", data = obj }, JsonRequestBehavior.AllowGet);
            }
            return(result);
        }