Пример #1
0
        private void LoadList(statusEN en, Exception ex)
        {
            AJAXObj obj = null;

            if (en == statusEN.err)
            {
                obj = new AJAXObj()
                {
                    Status = statusEN.err.ToString(),
                    Msg    = ex.Message,
                    Datas  = null
                };
            }
            else if (en == statusEN.success)
            {
                obj = new AJAXObj()
                {
                    Status = statusEN.success.ToString(),
                    Msg    = "加载成功",
                    Datas  = GetModelList()
                };
            }
            string jsonStr = Kits.JsSerializer(obj);

            Response.Write(jsonStr);
        }