[分享]组织机构图控件
ps自己一下。
http://www.v155.com/bbs/UploadFile/2005-4/2005415112427995.rar
http://www.v155.com/bbs/UploadFile/2005-4/2005415112623409.rar
上传到这里,呵呵
测试代码:
OrgNode orgNode = new OrgNode ();
orgNode.Text = "总公司" ;
orgNode.Description = "这是组织图的塔尖" ;
orgNode.NavigateUrl = "http://www.sina.com.cn";
//建立各节点
OrgNode OrgNode1 = new OrgNode ();
OrgNode1.Text = "分公司1" ;
OrgNode1.Description = "这是" ;
OrgNode1.Type = "GROUP";
OrgNode OrgNode11 = new OrgNode ();
OrgNode11.Text = "分公司1的员工" ;
OrgNode11.Type = "LOGIN";
OrgNode11.Description = "这是" ;
OrgNode OrgNode12 = new OrgNode ();
OrgNode12.Text = "分公司1的员工" ;
OrgNode12.Type = "LOGIN";
OrgNode12.Description = "这是" ;
OrgNode OrgNode2 = new OrgNode ();
OrgNode2.Text = "分公司2" ;
OrgNode2.Type = "ROLES";
OrgNode2.Description = "这是" ;
OrgNode OrgNode21 = new OrgNode ();
OrgNode21.Text = "分公司2" ;
OrgNode21.Type = "ROLES";
OrgNode21.Description = "这是" ;
OrgNode OrgNode3 = new OrgNode ();
OrgNode3.Text = "分公司3" ;
OrgNode3.Type = "ROLES";
OrgNode3.Description = "这是3" ;
OrgNode OrgNode4 = new OrgNode ();
OrgNode4.Text = "分公司4" ;
OrgNode4.Type = "ROLES";
OrgNode4.Description = "这是3" ;
//建立关系
orgNode.Nodes.Add ( OrgNode1 );
orgNode.Nodes.Add ( OrgNode2 );
OrgNode2.Nodes.Add ( OrgNode21 );
OrgNode1.Nodes.Add ( OrgNode11 );
OrgNode1.Nodes.Add ( OrgNode12 );
orgNode.Nodes.Add ( OrgNode3 );
orgNode.Nodes.Add ( OrgNode4 );
orgNode.GetNodeIndex();
wssmax.OrgNodeCollection OrgNodeCollection1 = new OrgNodeCollection(OrgNode1);
int i = OrgNodeCollection1.Count;
OrgNodeCollection1.Add(OrgNode2);
wssmax.OrgNodeType OrgNodeType1 = new OrgNodeType();
OrgNodeType1.NavigateUrl = "str";
wssmax.OrgNodeTypeCollection OrgNodeTypeCollection1 = new OrgNodeTypeCollection(OrgNode1);
OrgNodeTypeCollection1.Add(OrgNodeType1);
OrgChart1.Node = orgNode;