public static AjaxResult resultWith(AjaxResultEnum resultEnum, object data = null) { return(new AjaxResult { resultCode = (int)resultEnum, resultMsg = resultEnum.ToString(), data = data }); }
public static AjaxResult resultWith(AjaxResultEnum resultEnum, string resultMsg, object data) { return(new AjaxResult { resultCode = (int)resultEnum, resultMsg = resultMsg, data = data }); }
public static AjaxResult CreateAjaxResultObject(this ResultObject obj) { AjaxResultEnum @enum = obj.@enum; return(new AjaxResult { code = obj.@enum, msg = string.IsNullOrWhiteSpace(obj.msg) ? @enum.GetEnumDescription() : obj.msg, data = obj.data }); }