void LoadDgvDjry() { if (txt_tjdw.Text.Trim() == "") { txt_tjdw.Tag = ""; } dtDjry = new DataTable(); dtDjry = jyjkBiz.GetTjyfbxx(comn.DateTimeChange(dtp_rq1.Value.AddDays(-1)) + " 23:59:59", comn.DateTimeChange(dtp_rq2.Value) + " 23:59:59", txt_djh.Text.Trim(), txt_xm.Text.Trim(), txt_tjdw.Tag.ToString()); dg_djry.DataSource = dtDjry; lblCount.Text = "共" + dg_djry.Rows.Count.ToString() + "人"; }
void LoadDgvJbxx() { dtJbxx = new DataTable(); string dwbh = ""; if (cmbDw.SelectedIndex != -1) { dwbh = cmbDw.SelectedValue.ToString(); } dtJbxx = tjdjBiz.GetTjdjxx(dwbh, comn.DateTimeChange(dtpForm.Value.AddDays(-1)) + " 23:59:59", comn.DateTimeChange(dtpTo.Value) + " 23:59:59", txtXm.Text.Trim()); dgvJbxx.DataSource = dtJbxx; }
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() + "人"; }
void LoadTjxm() { if (txtDw.Text.Trim()=="") { txtDw.Tag = ""; } DataTable dt = new DataTable(); dt = tjjgBiz.GetSzTjbg(comn.DateTimeChange(dtpFrom.Value.AddDays(-1)) + " 23:59:59", comn.DateTimeChange(dtpTo.Value) + " 23:59:59",txtDw.Tag.ToString()); if (dt.Rows.Count > 0)//已存在记录 { dtTjhz.Rows.Clear(); // ,,,,,,,,, cmbRylb.Text = dt.Rows[0]["rylb"].ToString().Trim(); strBgid = dt.Rows[0]["bgid"].ToString().Trim(); maxdate = Convert.ToDateTime(dt.Rows[0]["maxdate"].ToString().Trim()); mindate = Convert.ToDateTime(dt.Rows[0]["mindate"].ToString().Trim()); txtDw.Text = dt.Rows[0]["dwmc"].ToString().Trim(); txtDw.Tag = dt.Rows[0]["sjdw"].ToString().Trim(); txtTjrs.Text = dt.Rows[0]["tjrs"].ToString().Trim(); txtTjxm.Text = dt.Rows[0]["tjxm"].ToString().Trim(); //txtTjjl.Text = dt.Rows[0]["tjjl"].ToString().Trim(); richTextBox1.Text = dt.Rows[0]["tjjl"].ToString().Trim(); DataRow row; for (int i = 0; i < dt.Rows.Count; i++) { row = dtTjhz.NewRow(); row["gz"] = dt.Rows[i]["gz"].ToString().Trim(); row["rs"] = dt.Rows[i]["zrs"].ToString().Trim(); row["ycrs"] = dt.Rows[i]["jkycrs"].ToString().Trim(); row["zyjkyc"] = dt.Rows[i]["zyycrs"].ToString().Trim(); row["dwmc"] = dt.Rows[i]["sjdw"].ToString().Trim(); row["whys"] = dt.Rows[i]["whys"].ToString().Trim(); dtTjhz.Rows.Add(row); dtTjhz.AcceptChanges(); } dgvTjhz.DataSource = dtTjhz; } else//不存在记录的 { MessageBox.Show("没有该单位的数据!", "提示"); return; } }