Esempio n. 1
0
        private void bt_select_Click(object sender, EventArgs e)
        {
            if (dtp_begin.Value > dtp_end.Value)
            {
                MessageBox.Show("开始日期不能大于结束日期!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.ActiveControl = dtp_begin;
                return;
            }

            if (txt_tjdw.Text == "")
            {
                txt_tjdw.Tag = "";
            }
            string str_dwbh = "";

            if (txt_tjdw.Tag.ToString().Trim() != "")
            {
                str_dwbh = txt_tjdw.Tag.ToString().Trim().Substring(0, 4);
            }
            string str_bmbh = txt_tjdw.Tag.ToString().Trim();

            if (str_bmbh.Length == 4)
            {
                str_bmbh = "";
            }


            DataTable dtJbxx = new DataTable();

            dtJbxx = tjdjbiz.GetTjdjxx_jkzpldy(str_dwbh, comn.DateTimeChange(dtp_begin.Value.AddDays(-1)) + " 23:59:59", comn.DateTimeChange(dtp_end.Value)
                                               + " 23:59:59", txt_xm.Text.Trim());
            dgv_tjdjb.DataSource = dtJbxx;
            ChargeColor();

            groupBox2.Text = "体检记录----办证人数合计:" + dtJbxx.Rows.Count.ToString() + "人";
        }