生成ContextMenuStrip var docMenu = new ContextMenuStrip(); ToolStripMenuItem deleteMenuItem = new ToolStripMenuItem(); deleteMenuItem.Text = "Delete"; deleteMenuItem.Click += new EventHandler(deleteMenuItem_Click); //给添加的ContextMenuStrip绑定click事件
public void create_tree(DataSet ds, int parentid) { DataSet newds = new DataSet(); newds= Bpc.GetList(" c_parentid=" + parentid.ToString()); foreach (DataRow dr in newds.Tables[0].Rows) {
1.显示效果 2.数据insert脚本 insert into CITY(id,text,pid) values('1','城市',null)insert into CITY(id,text,pid) values('2','北京市','1')insert into CITY(id,text,pid) values('3','上海市','1')insert into CITY(id,text,pid) values('4','天津市','1')insert into CITY(id,text,
实体类: using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace WindowsFormsApplication2 { public class China { public string AreaCode { get; set; } public string AreaName { get; set; } public string ParentAreaCod