/// <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.ExportByCustomerType(GetSqlWhere(), blInvoice); if (ds.Tables[0].Rows.Count > 0) { this.DownloadFile(ds, "ByCustomerType.xls", "CB01.xml"); } else { new Sinoo.Common.MessageShow().ExportErrorMessage(this); } }