找传奇、传世资源到传世资源站!

winform 组织结构图源码下载

8.5玩家评分(1人评分)
下载后可评
介绍 评论 失效链接反馈

采用树型结构显示部门组织结构代码
winform 组织结构图源码下载 C#语言基础-第1张using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace WindowsFormsApplication2{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { this.ctrlOrgChar1.DataSource = this.dt; this.ctrlOrgChar1.KeyFileName = "id"; this.ctrlOrgChar1.ParentKeyFileName = "pid"; this.ctrlOrgChar1.RootParentKeyValue= 0; this.ctrlOrgChar1.ShowChar(); } DataTable dt; private void Form1_Load(object sender, EventArgs e) { dt=new DataTable(); dt.Columns.Add(new DataColumn("id",typeof(int))); dt.Columns.Add(new DataColumn("pid", typeof(int))); dt.Columns.Add(new DataColumn("name", typeof(string))); dt.Rows.Add(new object[] { 40, 0, "1" }); dt.Rows.Add(new object[] { 2, 40, "2" }); dt.Rows.Add(new object[] { 3, 40, "3" }); dt.Rows.Add(new object[] { 4, 2, "4" }); dt.Rows.Add(new object[] { 5, 2, "5" }); dt.Rows.Add(new object[] { 6, 3, "6" }); dt.Rows.Add(new object[] { 7, 3, "7" }); dt.Rows.Add(new object[] { 8, 3, "8" }); dt.Rows.Add(new object[] { 9, 3, "9" }); dt.Rows.Add(new object[] { 10, 3, "10" }); dt.Rows.Add(new object[] { 11, 3, "11" }); dt.Rows.Add(new object[] { 12, 3, "12" }); dt.Rows.Add(new object[] { 13, 3, "13" }); this.bindingSource1.DataSource = dt; this.bindingSource1.DataMember = dt.TableName; } private void button2_Click(object sender, EventArgs e) { } } }

评论

发表评论必须先登陆, 您可以 登陆 或者 注册新账号 !


在线咨询: 问题反馈
客服QQ:174666394

有问题请留言,看到后及时答复