| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Web;
- using System.Web.UI;
- using System.Web.UI.WebControls;
- using System.Text;
- using System.Data;
- namespace HySoft.BaseCallCenter.Web.reportmanage.operationdata
- {
- public partial class ZuoXiWorkTotal : System.Web.UI.Page
- {
- protected void Page_Load(object sender, EventArgs e)
- {
- txtStartTime.Text = DateTime.Now.ToString("yyyy-MM-01");
- txtEndTime.Text = DateTime.Now.ToString("yyyy-MM-dd");
- if (!this.IsPostBack)
- {
- DataTable dt = DBUtility.DbHelperSQL.Query("select F_DeptId,F_DeptName,F_Remark from T_Sys_Department where F_ParentId!=0 and F_State=0").Tables[0];
- this.dtDpt.DataTextField = "F_DeptName";
- this.dtDpt.DataValueField = "F_DeptId";
- this.dtDpt.DataSource = dt;
- this.dtDpt.DataBind();
- this.dtDpt.Items.Insert(0, new ListItem("请选择"));
- this.dtDpt.SelectedIndex = 0;
- }
- }
- protected void exportExcel_Click(object sender, EventArgs e)
- {
- string fileName = "坐席报表" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".xls";
- Response.Clear();
- Response.Charset = "GB2312";
- Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");
- Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName));
- Response.ContentType = "application/ms-excel";
- Response.Write(this.htHtmlReport.Value);
- Response.End();
- }
- }
- }
|