Exemplo n.º 1
0
        public static object GetTableList()
        {
            var databaseList = DataAccessCode.GetDbList();

            return(from p in databaseList.AsEnumerable()
                   select new
            {
                id = 0,
                text = p["name"].ToString(),
                state = "closed",
                iconCls = "icon-database",
                children = from p2 in DataAccessCode.GetTableList(p["name"].ToString()).AsEnumerable()
                           select new
                {
                    id = 0,
                    text = p2["name"].ToString(),
                    iconCls = "icon-table",
                    attributes = new { url = "d=" + p["name"].ToString() + "&t=" + p2["name"].ToString() }
                }
            });
        }