private void bt_dj_Click(object sender, EventArgs e) { if (dg_djrymx.RowCount < 1 || dg_djry.RowCount < 1) { MessageBox.Show("请选择你要申请的人员信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); return; } DataGridViewRow dgr = dg_djry.CurrentRow; string djlsh = dgr.Cells["djlsh"].Value.ToString(); string tjbh = dgr.Cells["tjbh"].Value.ToString(); string tjcs = dgr.Cells["tjcs"].Value.ToString(); string result = lisbiz.Exec_Proc_LisApply(djlsh, tjbh, Program.username, tjcs); if (result == "1") { MessageBox.Show("申请成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); dg_djry.Rows.Remove(dgr); if (dg_djry.Rows.Count > 0) { dg_djry.CurrentCell = dg_djry.Rows[0].Cells[0]; } //dt.Rows.Clear(); } else if (result == "2") { MessageBox.Show("该人员已经申请登记了!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { MessageBox.Show("申请失败,请联系管理员!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } }