Пример #1
0
        private void bt_find_Click(object sender, EventArgs e)
        {
            if (txt_djlsh.Text.Trim() == "")
            {
                MessageBox.Show("请填写登记流水号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            str_djlsh = txt_djlsh.Text.Trim();
            DataTable dt = lisbiz.Get_TJ_TJDJB1(str_djlsh);

            if (dt.Rows.Count < 1)
            {
                MessageBox.Show("该登记流水号不存在,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txt_djlsh.Text = "";
                return;
            }
            txt_xm.Text = dt.Rows[0]["xm"].ToString().Trim();
            txt_nl.Text = dt.Rows[0]["nl"].ToString().Trim();
            txt_xb.Text = dt.Rows[0]["xb"].ToString().Trim();
            str_tjzt    = dt.Rows[0]["sumover"].ToString().Trim();

            cmb_zhxm.SelectedIndexChanged -= new EventHandler(cmb_zhxm_SelectedIndexChanged);
            cmb_zhxm.DataSource            = lisbiz.Get_TJ_BBDJB(str_djlsh);
            cmb_zhxm.DisplayMember         = "mc";
            cmb_zhxm.ValueMember           = "zhxm";
            cmb_zhxm.SelectedValue         = -1;
            cmb_zhxm.SelectedIndexChanged += new EventHandler(cmb_zhxm_SelectedIndexChanged);
        }