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); } } }
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) { if (dt.Rows.Count > 1) { Form_ryxz frm = new Form_ryxz(tjdjbiz.Get_TJ_TJDJB_ALL(txt_ksjs.Text.Trim())); if (frm.ShowDialog() == DialogResult.OK) { str_tjbh = frm.str_tjbh; str_tjcs = frm.str_tjcs; str_sumover = frm.str_sumover; } } else { str_tjbh = dt.Rows[0]["tjbh"].ToString().Trim(); str_tjcs = dt.Rows[0]["tjcs"].ToString().Trim(); str_sumover = dt.Rows[0]["sumover"].ToString().Trim(); } if (str_sumover == "2") { if (DialogResult.No == MessageBox.Show("该人员已经总检,是否继续查看记录?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information, MessageBoxDefaultButton.Button1)) { txt_ksjs.SelectAll(); return; } } TJDJB_DataBind(str_tjbh, str_tjcs); TJ_ZYJLMX_DataBind(str_tjbh, str_tjcs); TJ_ZYJL_DataBind(str_tjbh, str_tjcs); } else { MessageBox.Show("没有检索到记录,请检查检索值!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information); txt_ksjs.SelectAll(); return; } } }
private void Form_mxjg_Load(object sender, EventArgs e) { DataTable dt = tjjgbiz.Get_TJ_TJDJB(str_tjbh, str_tjcs); if (dt.Rows.Count > 0) { str_nl = dt.Rows[0]["nl"].ToString().Trim(); str_xb = dt.Rows[0]["xb"].ToString().Trim(); } cmb_jcys.DataSource = tjjgbiz.Get_Xt_YS(); cmb_jcys.DisplayMember = "czymc"; cmb_jcys.ValueMember = "czyid"; cmb_jcys.SelectedIndex = -1; cmb_czy.DataSource = tjjgbiz.Get_Xt_CZY(); cmb_czy.DisplayMember = "czymc"; cmb_czy.ValueMember = "czyid"; cmb_czy.SelectedIndex = -1; TJJLB_DataBind(str_tjbh, str_tjcs); }