private void bt_delete_Click(object sender, EventArgs e) { if (txt_lclx.Text.Trim() == "") { return; } if (ywszbiz.Exists_Lclx(txt_lclx.Text.Trim()) > 0) { MessageBox.Show("该项目被引用了,不能删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } ywszbiz.Delete_tj_lclxb(txt_lclx.Text.Trim()); MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); ClearControl(); DataBind(); }