<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Sends.aspx.cs" Inherits="Pages_sxt_Sends" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>无标题页</title>
    <meta http-equiv="Content-Type" content="text/htm ">
    <meta http-equiv="refresh" content="300">
</head>
<body>
    <form id="form1" runat="server">
    <div style="margin:12px;">
    <asp:GridView Caption="我的呼叫中心" ID=GridView1 runat=server OnRowDeleting=Gridview1_RowDeleting OnRowCommand=GridView1_RowCommand OnPageIndexChanging=GridView1_PageIndexChanging>
        <Columns>
            <asp:TemplateField HeaderText="序号" ItemStyle-HorizontalAlign=Center ItemStyle-Width=60>
                <ItemTemplate><%#Container.DataItemIndex+1%></ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="客户名称" HeaderStyle-Wrap=false ItemStyle-Wrap=false>
                <ItemTemplate>
                    <%#CRM.Common.InitData.GetSalesName(Eval("eid").ToString()) %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="客户手机" HeaderStyle-Wrap=false ItemStyle-Wrap=false>
                <ItemTemplate>
                    <%#GetClientMobile(Eval("eid").ToString()) %>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="语音文本" HeaderText="语音文本" />
            <asp:BoundField DataField="短信文本" HeaderText="短信文本" />
            <asp:TemplateField HeaderText="处理结果" ItemStyle-Width=160>
                <ItemTemplate>
                    已发送：<%#Eval("已发送").ToString()%>；未发送：<%#Eval("未发送").ToString()%>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="创建时间" HeaderText="创建时间" HtmlEncode=false DataFormatString="{0:yyyy-MM-dd HH:MM}" ItemStyle-HorizontalAlign=Center ItemStyle-Width=100 />
            <%--<asp:HyperLinkField HeaderText="文件下载" DataNavigateUrlFormatString="../../{0}" Text="号码下载" Target=_blank ItemStyle-Width=100 ItemStyle-HorizontalAlign=Center DataNavigateUrlFields="呼叫号码" />--%>
            <asp:ButtonField CommandName="Select" HeaderText="操作" Text="处理" ItemStyle-HorizontalAlign=Center ItemStyle-Width=60 />
        </Columns>
        <EmptyDataTemplate>
            无呼叫信息
        </EmptyDataTemplate>
    
    </asp:GridView>
    <div style="float:right;">
        <asp:RadioButtonList ID=rbl2 runat=server RepeatDirection=Horizontal OnTextChanged=rbl2_TextChanged AutoPostBack=true  >
            <asp:ListItem Text="未完成" Value=0 Selected=True />
            <asp:ListItem Text="已完成" Value=1 />
            <asp:ListItem Text="全部" Value=2 />
        </asp:RadioButtonList>
    </div>
        <asp:Panel ID=Panel2 runat=server Visible=false>
        <table width=100% style="margin-top:12px;">
            <tr>
                <td colspan=4 style="border-bottom:solid 1px Black;"><b>编辑呼叫信息</b></td>
            </tr>
            <tr>
                <td style="width:80px;">语音文本</td><td colspan=3><asp:TextBox ID=TextBox1 TextMode=multiLine Rows=3 runat=server /></td>
            </tr>
            <tr>
                <td>短信文本</td><td colspan=3><asp:TextBox ID=TextBox2 TextMode=multiLine  Rows=3 runat=server /></td>
            </tr>
            <tr>
                <td>处理状态</td><td width=300>
                <asp:RadioButtonList ID=rbl1 runat=server RepeatDirection=Horizontal OnTextChanged="rbl_TextChanged" AutoPostBack=true >
                    <asp:ListItem Text="用户提交" Value="-1" />
                    <asp:ListItem Text="正在处理" Value="0" Selected=True />
                    <asp:ListItem Text="完成" Value=1 />                    
                </asp:RadioButtonList>
                </td>
                <td colspan=2>&nbsp;</td>
            </tr>
            <tr>
                <td>下载文件</td><td colspan=2><asp:HyperLink ID=HyperLink1 runat=server Text="下载文件" Target=_blank /><asp:Button ID=Button3 runat=server Text="下载文件" OnClick=Button3_Click  Visible=false  />&nbsp;<asp:HyperLink ID=HyperLink2 runat=server Text="语音文件" Target=_blank /></td><td><asp:Label ID=Label1 runat=server Visible=false/></td>
            </tr>
            <tr><td colspan=4>&nbsp;</td></tr>            
        </table>
        </asp:Panel>
        <asp:Panel ID=Panel1 runat=server Visible=false Width=100% >
        <table style="border:solid 1px blue; padding:6px; width:100%;">
            <tr>
                <td colspan=4 style="border-bottom:solid 1px Black;">处理结果</td>
            </tr>
            <tr>
                  <td width=80 style="text-align:center;">已发送：</td><td width=120><asp:TextBox ID=TextBox3 runat=server /></td>                
                  <td width=80 style="text-align:center;">未发送：</td><td width=120><asp:TextBox ID=TextBox4 runat=server /><asp:Label ID=Label2 runat=server Visible=false /></td>
            </tr>
            <tr>
            </tr>
            <tr>
                <td>上传呼叫详单</td><td ><asp:FileUpload ID=FileUpload1 runat=server Width=100% /></td>
            </tr>
            <tr>
                <td colspan=4>&nbsp;</td>
            </tr>
            <tr>
                <td colspan=4 style="text-align:center;"><asp:Button ID=Button2 runat=server Text="完成" OnClick=Button2_Click OnClientClick="return confirm('确定？')" /></td>
            </tr>
        </table>
        </asp:Panel>
    </div>
    </form>
</body>
</html>
