コード例 #1
0
        protected override Web.Com.XResp Execute()
        {
            var tree = new XTree();

            tree.LoadList += tree_LoadList;
            tree.InitTree("");
            var r = new Resp_List();

            r.items = tree.OutTree();
            return(r);
        }
コード例 #2
0
ファイル: select.cs プロジェクト: hongweichang/x.yfj
        protected override void InitDict()
        {
            var tree = new XTree();

            tree.LoadList += tree_LoadList;
            tree.InitTree("");
            var list = tree.OutTree();

            list.Insert(0, new item()
            {
                id = "0", name = "无"
            });
            dict.Add("dict", list);
        }
コード例 #3
0
        protected override XResp Execute()
        {
            var r = new Resp_List();

            var tree = new XTree();

            tree.LoadList += tree_LoadList;
            tree.InitTree("", 5);

            var data = tree.OutTree();

            if (!string.IsNullOrEmpty(key))
            {
                r.items = data.Where(o => o.name.Contains(key)).ToList();
            }
            else
            {
                r.items = data;
            }

            return(r);
        }