private void bt_save_Click(object sender, EventArgs e) { if (txt_jyxtbh.Text.ToString() == "") { MessageBox.Show("请填写检验科室项目编码!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } //判断检验科编码是否已经对照 DataTable dt = lisbiz.Get_LIS_JGXMDZB(txt_jyxtbh.Text.Trim(), txt_tjxtbh.Text.Trim()); if (dt.Rows.Count > 0) { MessageBox.Show("检验项目编码已经被体检项目【" + dt.Rows[0]["mc"].ToString() + "】对照,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } lisbiz.str_Insert_TJ_JGXMDZB(txt_tjxtbh.Text.Trim(), txt_jyxtbh.Text.Trim(), txt_sm.Text.Trim()); MessageBox.Show("保存成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); }