日期:2014-05-17 浏览次数:20440 次
<asp:DataGrid ID="DataGrid1" runat="server" AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" GridLines="Vertical" AllowSorting="True" OnCancelCommand="DataGrid1_CancelCommand" OnEditCommand="DataGrid1_EditCommand" OnItemDataBound="DataGrid1_ItemDataBound" OnUpdateCommand="DataGrid1_UpdateCommand" DataKeyField="nid"> <Columns> <asp:BoundColumn DataField="sendtime" HeaderText="呼叫时间" ReadOnly="True"></asp:BoundColumn> <asp:BoundColumn DataField="workercallerid" HeaderText="主叫坐席" ReadOnly="True"></asp:BoundColumn> <asp:BoundColumn DataField="SendCallerID" HeaderText="被叫电话" ReadOnly="True"></asp:BoundColumn> <asp:BoundColumn DataField="setcallerid" HeaderText="显示号码" ReadOnly="True"></asp:BoundColumn> <asp:BoundColumn DataField="workerhold" HeaderText="坐席通话时长" ReadOnly="True"></asp:BoundColumn> <asp:BoundColumn DataField="sendhold" HeaderText="用户通话时长" ReadOnly="True"></asp:BoundColumn> <asp:BoundColumn DataField="fee" HeaderText="呼叫费用" ReadOnly="True"></asp:BoundColumn> <asp:TemplateColumn HeaderText="营销结果"> <ItemTemplate> <%# DataBinder.Eval(Container.DataItem,"lbmc") %> </ItemTemplate> <EditItemTemplate> <asp:DropDownList ID="dep_jieguo" runat="server"> </asp:DropDownList> </EditItemTemplate> </asp:TemplateColumn> <asp:BoundColumn DataField="jieguo" HeaderText="结果ID" ReadOnly="True"></asp:BoundColumn> <asp:BoundColumn DataField="RecFile" HeaderText="录音" ReadOnly="True"></asp:BoundColumn> <asp:EditCommandColumn ButtonType="PushButton" CancelText="取消" EditText="编辑" HeaderText="操作" UpdateText="更新"></asp:EditCommandColumn> </Columns></asp:DataGrid>
CheckAdInfoSort(); FirstBindData(); Response.Clear(); Response.Buffer = true; Response.Charset = "GB2312"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + DateTime.Now.ToShortDateString() + ".xls"); Response.ContentEncoding = System.Text.Encoding.UTF7; //Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");//设置输出流为简体中文 Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件