<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Pages_Client_Default" %>
<%@ Register TagPrefix="Client" TagName="ClientList" Src="../../Controls/Client/ClientListControl.ascx" %>
<%@ Register TagPrefix="ClientContact" TagName="ClientContactList" Src="../../Controls/Client/ClientContactList.ascx" %>

<!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 id="Head1" runat="server">
    <title>左侧导航栏</title>
</head>
<body>
    <form id="form1" runat="server">
        <div style="margin-left:12px;">
<script language="javascript" type="text/javascript">
       function selectAll(obj)
       {
           var theTable     = obj.parentElement.parentElement.parentElement;
           var i;
           var j = obj.parentElement.cellIndex;
        
           for(i=0;i<theTable.rows.length;i++)
           {
               var objCheckBox = theTable.rows[i].cells[j].firstChild;
               if(objCheckBox.checked!=null)objCheckBox.checked = obj.checked;
           }
       }
</script>

<div style="display:none;">
    <table border=1 width=100%>
        <tr>
            <td width=60>客户名称</td><td width=120><asp:TextBox ID=txtClientName runat=server /></td>
            <td width=60>主联系人</td><td width=80><asp:TextBox ID=txtCantactName runat=server /></td>
            <td width=80><asp:DropDownList ID=ddlProvince runat=server OnTextChanged=ddlProvince_TextChanged AutoPostBack=true /></td>
            <td width=80><asp:DropDownList ID=ddlCity runat=server /></td>
            <td width=80><asp:DropDownList ID=ddlSales runat=server /></td>
            <td width=80><asp:DropDownList ID=ddlClientType runat=server Width=120 /></td>
            <td width=80><asp:DropDownList ID=ddlClientPhase runat=server Width=120/></td>
            <td width=80><asp:DropDownList ID=ddlClientStatus runat=server Width=120 /></td>
            <td width=80><asp:DropDownList ID=ddlClientRank runat=server Width=120 /></td>   
            <td width=80><asp:DropDownList ID=ddlClientIndustry runat=server Width=120 /></td>         
            <td><asp:Button ID=Button1 runat=server Text="查询" OnClick="Button1_Click" /></td>
        </tr>
    </table>
</div>
<div >
    <asp:GridView ID="GridView1" runat="server"         
             OnSelectedIndexChanged=GridView1_SelectedIndexChanged
             OnRowDeleting=GridView1_RowDeleting  
             OnRowCreated=GridView1_RowCreated
             OnRowCommand=GridView1_RowCommand
             OnPageIndexChanging=GridView1_PageIndexChanging
             OnRowDataBound=GridView1_RowDataBound
             PagerSettings-Position=Bottom
             PagerStyle-HorizontalAlign=Right
             OnDataBound=GridView1_DataBound PageSize=10    
             PagerSettings-Mode=NextPreviousFirstLast
             PagerSettings-FirstPageText=首页
             PagerSettings-LastPageText=尾页
             PagerSettings-NextPageText=下一页
             PagerSettings-PreviousPageText=上一页      
              >
        <Columns>
            <asp:TemplateField ItemStyle-HorizontalAlign=center ItemStyle-Width=50 Visible=false>
                <HeaderTemplate><asp:CheckBox ID=CheckBox1 runat=server onclick="selectAll(this);" Text=全选  /></HeaderTemplate>
                <ItemTemplate>
                    <asp:CheckBox ID=CheckBox2 runat=server   />
                </ItemTemplate>
            </asp:TemplateField>            
            <%--<asp:TemplateField HeaderText="序号" ItemStyle-HorizontalAlign=center ItemStyle-Font-Bold=true >
                <ItemTemplate>
                    <%#Container.DataItemIndex+1%>
                </ItemTemplate>
            </asp:TemplateField>--%>
            <asp:TemplateField HeaderText="客户名称" ItemStyle-HorizontalAlign=Center>
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButton1" runat="server" CommandName="Select" 
                        Text='<%# Bind("客户名称") %>'></asp:LinkButton>                     
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="详细地址" HeaderText="详细地址" Visible=false />
            <asp:BoundField DataField="主联系人" HeaderText="主联系人" />
            <%--<asp:BoundField DataField="部门" HeaderText="部门" />--%>
            <asp:BoundField DataField="职务" HeaderText="职务" />
            <asp:BoundField DataField="客户电话" HeaderText="客户电话" />
            <asp:BoundField DataField="客户传真" HeaderText="客户传真" Visible=false />
            <asp:BoundField DataField="联系手机" HeaderText="联系手机" />
            <asp:BoundField DataField="电子邮箱" HeaderText="电子邮箱" />
            <asp:TemplateField HeaderText="客户阶段">
                <ItemTemplate>
                    <asp:DropDownList ID=DropDownList1 runat=server Enabled=false />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="客户类型">
                <ItemTemplate>
                    <asp:DropDownList ID=DropDownList2 runat=server Enabled=false />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="建档人">
                <ItemTemplate>                        
                    <%#CRM.Common.InitData.GetSalesName(Eval("业务员").ToString()) %>
                </ItemTemplate>
            </asp:TemplateField>            
            <asp:BoundField DataField="创建日期" HeaderText="建档时间" HtmlEncode=false DataFormatString="{0:yyyy-MM-dd}" />
        </Columns>
        <SelectedRowStyle BackColor="Silver" />
        <AlternatingRowStyle BackColor="#E0E0E0" />
        <PagerStyle HorizontalAlign="Right" />
    </asp:GridView>
    <div>
    </div>
    <div>
        <table width=100%>
            <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 MaxLength=70 /></td>
            </tr>
            <tr>
                <td>短信文本</td><td colspan=3><asp:TextBox ID=TextBox2 TextMode=multiLine  Rows=3 runat=server MaxLength=140 /></td>
            </tr>
            <tr>
                <td>语音文件</td><td><asp:FileUpload ID=FileUpload1 runat=server /></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>
    </div>        
 </div>        
        
        </div>        
   </form>
</body>
</html>