示例#1
0
        public static JsonResult JsonShowContentResult(this Controller ctx, string divResult, string url,
                                                       object prms = null, JsonResultExtParams extraExtParams = null)
        {
            if (extraExtParams == null)
            {
                if (prms == null)
                {
                    return new JsonResult {
                               Data = new { Status = "Request", divResult, url }
                    }
                }
                ;


                return(new JsonResult {
                    Data = new { Status = "Request", divResult, url, prms }
                });
            }

            if (prms == null)
            {
                return new JsonResult {
                           Data = new { Status = "Request", divResult, url, showLoading = extraExtParams.ShowLoading, hideDialog = extraExtParams.HideDialog, hideDetails = extraExtParams.HideDetails }
                }
            }
            ;


            return(new JsonResult {
                Data = new { Status = "Request", divResult, url, prms, showLoading = extraExtParams.ShowLoading, hideDialog = extraExtParams.HideDialog, hideDetails = extraExtParams.HideDetails }
            });
        }
示例#2
0
        public static JsonResult JsonShowContentResult(this Controller ctx, string divResult, string url,
          object prms = null, JsonResultExtParams extraExtParams = null)
        {

            if (extraExtParams == null)
            {
                if (prms == null)
                    return new JsonResult {Data = new {Status = "Request", divResult, url}};


                return new JsonResult {Data = new {Status = "Request", divResult, url, prms}};
            }

                if (prms == null)
                    return new JsonResult { Data = new { Status = "Request", divResult, url, showLoading = extraExtParams.ShowLoading, hideDialog = extraExtParams.HideDialog, hideDetails = extraExtParams.HideDetails } };


                return new JsonResult { Data = new { Status = "Request", divResult, url, prms, showLoading = extraExtParams.ShowLoading, hideDialog = extraExtParams.HideDialog, hideDetails = extraExtParams.HideDetails } };

        }