市长热线演示版

TowUserDepartmentAPI.aspx.cs 1.1KB

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Web;
  5. using System.Web.UI;
  6. using System.Web.UI.WebControls;
  7. namespace HySoft.BaseCallCenter.Web.reportmanage.operationdata
  8. {
  9. public partial class TowUserDepartmentAPI : System.Web.UI.Page
  10. {
  11. protected void Page_Load(object sender, EventArgs e)
  12. {
  13. txtStartTime.Text = DateTime.Now.ToString("yyyy-MM-01");
  14. txtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
  15. }
  16. protected void exportExcel_Click(object sender, EventArgs e)
  17. {
  18. string fileName = "二线工程师部门工单KPI考核情况报表" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
  19. Response.Clear();
  20. Response.Charset = "GB2312";
  21. Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
  22. Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName));
  23. Response.ContentType = "application/ms-excel";
  24. Response.Write(this.htHtmlReport.Value);
  25. Response.End();
  26. }
  27. }
  28. }