Beispiel #1
0
 private void bt_delete_Click(object sender, EventArgs e)
 {
     if (txt_bh.Text.Trim() == "")
     {
         return;
     }
     //注意业务项目引用了,就不允许删除,暂时没有控制**********************************************************************
     if (ywszbiz.Exists_Tjzhxm(txt_bh.Text.Trim()) > 0)
     {
         MessageBox.Show("该项目被引用了,不允许删除!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
         return;
     }
     ywszbiz.Delete_tj_zhxm_hd(txt_bh.Text.Trim());
     MessageBox.Show("删除成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     tv_tjlxb.Nodes.Remove(tv_tjlxb.SelectedNode);
     ClearControl();
     dtTjxmb.Rows.Clear();
 }