public List <ComboxTree> GetPropertyTree(string schemaCode)
        {
            ComboxTree root = new ComboxTree()
            {
                text     = "PropertyTreeHandler.DataItem",
                children = new List <ComboxTree>()
            };

            // 系统数据项
            root.children.Add(new ComboxTree()
            {
                text     = "PropertyTreeHandler.SystemDataItem",
                children = new List <ComboxTree>()
            });

            TreeNode systemNode = this.GetInstanceDataTreeNode();

            AddSystemTreeNode(root.children[0], systemNode);

            // 流程数据项
            root.children.Add(new ComboxTree()
            {
                text     = "PropertyTreeHandler.WorkflowDataItem",
                children = new List <ComboxTree>()
            });
            BizObjectSchema schema = _controller.Engine.BizObjectManager.GetPublishedSchema(schemaCode);

            if (schema != null)
            {
                PropertySchema[] schemas = schema.Properties;
                if (schemas != null)
                {
                    foreach (PropertySchema field in schemas)
                    {
                        root.children[1].children.Add(new ComboxTree()
                        {
                            id   = field.Name,
                            text = field.FullName
                        });
                    }
                }
            }
            List <ComboxTree> results = new List <ComboxTree>();

            results.Add(root);
            return(results);
        }
 private void AddSystemTreeNode(ComboxTree treeNode, System.Web.UI.WebControls.TreeNode systemNode)
 {
     foreach (System.Web.UI.WebControls.TreeNode node in systemNode.ChildNodes)
     {
         ComboxTree t = new ComboxTree()
         {
             id   = node.Value,
             text = node.Text
         };
         if (node.ChildNodes.Count > 0)
         {
             t.children = new List <ComboxTree>();
             AddSystemTreeNode(t, node);
         }
         treeNode.children.Add(t);
     }
 }