private void dgv_tjdjb_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) { return; } DataGridViewRow dgr = dgv_tjdjb.SelectedRows[0]; str_tjbh = dgr.Cells["tjbh"].Value.ToString().Trim(); str_tjcs = dgr.Cells["tjcs"].Value.ToString().Trim(); str_sumover = dgr.Cells["sumover"].Value.ToString().Trim(); strDjlsh = dgr.Cells["djlsh"].Value.ToString().Trim(); #region 收费检查 string str_sfbz = dgr.Cells["sfbz"].Value.ToString().Trim(); string str_bzsfxz = xtbiz.GetXtCsz("bzsfxz"); //办证收费流程限制 if (str_bzsfxz == "1" && str_sfbz == "1") //限制 { int sl = tjglbiz.TjSfCx(str_tjbh, str_tjcs); if (sl <= 0) //未收费 { MessageBox.Show("本单位进行了财务流程控制,请先交费!", "提示"); return; } } #endregion this.DialogResult = DialogResult.OK; }
private void txt_ksjs_KeyDown(object sender, KeyEventArgs e) { if (e.KeyData == Keys.Enter) { if (txt_ksjs.Text.Trim() == "") { MessageBox.Show("请填写快速检索值!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); this.ActiveControl = txt_ksjs; return; } DataTable dt = tjjgbiz.Get_TJ_TJDJB(txt_ksjs.Text.Trim()); if (dt.Rows.Count > 0) { str_tjbh = dt.Rows[0]["tjbh"].ToString().Trim(); str_tjcs = dt.Rows[0]["tjcs"].ToString().Trim(); if (dt.Rows[0]["sumover"].ToString().Trim() == "2") { if (DialogResult.No == MessageBox.Show("该人员已经主检,是否查看记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)) { txt_ksjs.Text = ""; return; } } #region 收费检查 string str_sfbz = dt.Rows[0]["sfbz"].ToString().Trim(); string str_bzsfxz = xtbiz.GetXtCsz("bzsfxz"); //办证收费流程限制 if (str_bzsfxz == "1" && str_sfbz == "1") //限制 { int sl = djBiz.TjSfCx(str_tjbh, str_tjcs); if (sl <= 0) //未收费 { MessageBox.Show("本单位进行了财务流程控制,请先交费!", "提示"); return; } } #endregion str_sumover = dt.Rows[0]["sumover"].ToString().Trim(); TJDJB_DataBind(str_tjbh, str_tjcs); TJJLB_WJ_DataBind(str_tjbh, str_tjcs); txt_ksjs.Text = ""; } else { txt_ksjs.Text = ""; MessageBox.Show("没有检索到记录,请检查检索值!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } } }