示例#1
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            var settings = SettingFileService.GetSettings("c:\\1.xml");

            var json = settings.ToJson();

            Response.Write(json);
        }
示例#2
0
        public string GetLayoutSkins()
        {
            AjaxResponse ajaxResponse = new AjaxResponse();

            var layoutIndexFile = HttpContext.Current.Server.MapPath("~/Widgets/Themes/Themes.xml");

            try
            {
                var skins = SettingFileService.GetSettings(layoutIndexFile);

                ajaxResponse.Data    = skins;
                ajaxResponse.Success = true;
            }
            catch (Exception ex)
            {
                //获取widget列表失败
                ajaxResponse.Success = false;
                ajaxResponse.Message = ex.Message;
            }

            return(ajaxResponse.ToJson());
        }