/// <summary> /// 删除用户 /// </summary> public void Delete_User(object sender, EventArgs e) { Button button = (Button)sender; CheckBoxComboBox cbcb = panel2.Controls["panel_" + button.Name].Controls["cbcb0"] as CheckBoxComboBox; CheckBoxComboBox cbcb1 = panel2.Controls["panel_" + button.Name].Controls["cbcb1"] as CheckBoxComboBox; CheckBoxComboBox cbcb2 = panel2.Controls["panel_" + button.Name].Controls["cbcb2"] as CheckBoxComboBox; CheckBoxComboBox cbcb3 = panel2.Controls["panel_" + button.Name].Controls["cbcb3"] as CheckBoxComboBox; CheckBoxComboBox cbcb4 = panel2.Controls["panel_" + button.Name].Controls["cbcb4"] as CheckBoxComboBox; Panel p_delete = panel2.Controls["panel_" + button.Name] as Panel; Point pp = p_delete.Location; this.Controls.Remove(p_delete); p_delete.Dispose(); User_BLL.Delete_UserByCondition(button.Name); //LoadSource(); }