コード例 #1
0
 public JsonModel()
 {
     _res        = new JsonParam();
     _jsonResult = new JsonResult()
     {
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
コード例 #2
0
 public JsonResult SetResult(JsonParam param)
 {
     if (param == null)
     {
         return(Defeate());
     }
     _jsonResult.Data = param;
     return(_jsonResult);
 }
コード例 #3
0
 /// <summary>
 /// 自定义响应结果 *支持多语言*
 /// </summary>
 /// <param name="param"></param>
 /// <param name="_IsTranslate">是否进行翻译(默认翻译)</param>
 /// <returns></returns>
 public JsonResult SetResult(JsonParam param, bool _IsTranslate = true)
 {
     if (param == null)
     {
         return(Defeate(_IsTranslate));
     }
     jsonResult.Data = param;
     return(jsonResult);
 }