private void bt_delete_Click(object sender, EventArgs e) { if (txt_lxbh.Text.Trim() == "") { return; } //注意项目引用了,就不允许删除,暂时没有控制 if (ywszbiz.Exists_Lcbh(txt_lxbh.Text.Trim()) > 0) { MessageBox.Show("该项目被引用了,不允许删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } ywszbiz.Delete_tj_tjlxb(txt_lxbh.Text.Trim()); MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearControl(); DataBind(); }