private void bt_search_Click(object sender, EventArgs e) { int zt = 0; if (cmb_zt.Text == "全部") { zt = 0; } if (cmb_zt.Text == "未登记") { zt = 1; } if (cmb_zt.Text == "已登记") { zt = 2; } string rq1 = dtp_rq1.Value.ToString("yyyyMMdd"); string rq2 = dtp_rq2.Value.ToString("yyyyMMdd"); dg_djry.DataSource = lisbiz.Get_TJ_TJDJB(zt, txt_djh.Text.Trim(), txt_xm.Text.Trim(), rq1, rq2); foreach (DataGridViewRow dgrow in dg_djry.Rows) { string sjcxxh = dgrow.Cells["sjcxxh"].Value.ToString(); if (sjcxxh != "") { dgrow.DefaultCellStyle.BackColor = Color.Violet; } } }
private void bt_search_Click(object sender, EventArgs e) { string rq1 = dtp_rq1.Value.ToString("yyyyMMdd"); string rq2 = dtp_rq2.Value.ToString("yyyyMMdd"); dg_djsqry.DataSource = lisbiz.Get_TJ_TJDJB(rq1, rq2); }