private void bt_allprint_Click(object sender, EventArgs e) { if (object.Equals(null, dgv_tjdjb.CurrentRow)) { return; } if (dgv_tjdjb.Rows.Count < 1) { return; } pw.StartThread(); foreach (DataGridViewRow dgr in dgv_tjdjb.Rows) { if (dgr.Cells["selected"].Value.ToString().Trim() == "1") { string str_tjbh = dgr.Cells["tjbh"].Value.ToString().Trim(); string str_tjcs = dgr.Cells["tjcs"].Value.ToString().Trim(); string str_djlsh = dgr.Cells["djlsh"].Value.ToString().Trim(); PrintRdlc(str_tjbh, str_tjcs, str_djlsh); tjdjBiz biz = new tjdjBiz(); biz.UpdatePrintZYD(str_tjbh); } } pw.StopThread(); }