private void butborrDc_Click(object sender, EventArgs e) { if (lvborrQuer.Items.Count <= 0) { MessageBox.Show("未发现数据!"); return; } string file = ""; if (saveFile.ShowDialog() == DialogResult.OK) { file = saveFile.FileName; } else { file = ""; } if (file.Trim().Length <= 0) { return; } try { butborrQuer.Enabled = false; butborrDc.Enabled = false; if (!BorrMethod.SaveFile(lvborrQuer, file)) { return; } string str = "导出数据:" + lvborrQuer.Items.Count + "字段:" + comborrbcol.Text.Trim() + "-> 操作符:" + comborrbczf.Text.Trim() + "-> 关键字:" + txtborrgjz.Text.Trim() + " -> 时间:" + dateborrtime1.Text + "-" + dateborrtime2.Text; Common.WriteBorrLog("0", "0", 0, str); } catch (Exception ex) { MessageBox.Show("导出失败:" + ex.ToString()); } finally { butborrQuer.Enabled = true; butborrDc.Enabled = true; } }