Exemplo n.º 1
0
        private void GetDictListXML()
        {
            int queryInt = WebUtils.GetQueryInt("id");

            System.Text.StringBuilder stringBuilder          = new System.Text.StringBuilder();
            System.Collections.Generic.List <DictsInfo> list = (System.Collections.Generic.List <DictsInfo>)Dicts.GetCacheDictsList();
            if (list != null && list.Count > 0)
            {
                foreach (DictsInfo current in list)
                {
                    stringBuilder.Append(string.Concat(new object[]
                    {
                        "{id:'",
                        current.AutoID.ToString(),
                        "',name:'",
                        current.DisplayName,
                        "',isParent:false,'iconSkin':'leaf','click':\"AppendVal(",
                        current.AutoID,
                        ",'",
                        current.DisplayName,
                        "')\"},"
                    }));
                }
            }
            base.Response.Write("[" + stringBuilder.ToString().TrimEnd(new char[]
            {
                ','
            }) + "]");
        }