private void btnParentSearch_Click(object sender, EventArgs e)
        {
            TreeSearch frm = new TreeSearch();

            frm.AfterSelectNodeHandler += frm_AfterSelectNodeHandler;
            frm.ShowDialog();
        }
 private void button1_Click(object sender, EventArgs e)
 {
     if (gv_module.SelectedRows.Count > 0)
     {
         var         list   = (List <Base_Button>)gv_module.DataSource;
         Base_Button source = list[gv_module.SelectedRows[0].Index];
         TreeSearch  frm    = new TreeSearch();
         frm.AfterSelectNodeHandler += (x, y) =>
         {
             source.ButtonId = 0;
             source.ParentId = 0;
             source.ModuleId = y;
             source.Category = source.Category == "工具栏" ? "1" : "2";
             _bll.AddBase_Button(source);
         };
         frm.ShowDialog();
     }
     else
     {
         MessageBox.Show("请选择一条记录!");
     }
 }