/// <summary> /// 导出事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btnExport_Click(object sender, EventArgs e) { bool blInvoice = (!string.IsNullOrEmpty(this.txtBeginInvoiceTime.Text.Trim()) || !string.IsNullOrEmpty(this.txtEndInvoiceTime.Text.Trim())); DataSet ds = _ExcelBLL.ExportByCustomerName(GetSqlWhere(), blInvoice); if (ds.Tables[0].Rows.Count > 0) { this.DownloadFile(ds, "ByCustomerName.xls", "ByCustomerName.xml"); } else { new Sinoo.Common.MessageShow().ExportErrorMessage(this); } }