<%@ page language="C#" autoeventwireup="true" inherits="Member_ClientRelation_ClientList, WebApp_deploy" %>

<!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>
    <link href="../../Skin/Default/Member/Red.css" rel="stylesheet" type="text/css" />
    <base target="_self" />
</head>
<body>
    <form id="clientForm" runat="server">
    <div id="MainMenu">
        <div class="TabText">
            <div class="pagetitle" style="line-height: 30px; font-weight: bold; font-size: 14px;
                color: Red; vertical-align: middle;">
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Literal ID="ltrPageTitle" runat="server"></asp:Literal>
            </div>
            <div style="text-align: right">
                <br />
                <asp:TextBox ID="txtClientName" CausesValidation="false" runat="server"></asp:TextBox>&nbsp;&nbsp;
                <asp:Button ID="SeachBut" runat="server" Text="查询" OnClick="SeachBut_Click" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <br />
            </div>
            <asp:GridView ID="gvClient" runat="server" AllowPaging="True" AutoGenerateColumns="false"
                CssClass="tableHead" OnRowDataBound="gvClient_RowDataBound" OnPageIndexChanging="gvClient_PageIndexChanging"
                PageSize="10">
                <Columns>
                    <asp:BoundField HeaderText="ID" DataField="ClientID" />
                    <asp:BoundField DataField="ShortedForm" HeaderText="助记名称" />
                    <asp:TemplateField HeaderText="客户名称">
                        <ItemTemplate>
                            <a style="cursor: pointer;" onclick="javascript:window.returnValue='<%# string.Format("{0}|{1}|{2}",Eval("ClientName"),Eval("ClientType"),Eval("ClientID"))%>';window.close();">
                                <asp:Label ID="lblClientName" runat="server"><%# Eval("ClientName")%></asp:Label></a>
                            <%--<a style="cursor:pointer;" onclick="javascript:window.returnValue='<%# Eval("ClientName")%>';window.close();">
                                <%# Eval("ClientName")%></a>--%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="所有者" DataField="Owner" />
                    <asp:TemplateField HeaderText="客户类型">
                        <ItemTemplate>
                            <%#GetDictionaryTitle(Eval("ClientType").ToString().Trim())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="客户组别">
                        <ItemTemplate>
                            <%#GetDictionaryTitle(Eval("GroupID").ToString().Trim()) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <table style="width: 100%" class="tableHead">
                        <tr>
                            <th>
                                ID
                            </th>
                            <th>
                                助记名称
                            </th>
                            <th>
                                客户名称
                            </th>
                            <th>
                                所有者
                            </th>
                            <th>
                                客户类型
                            </th>
                            <th>
                                客户组别
                            </th>
                        </tr>
                        <tr>
                            <td colspan="6" style="text-align: center">
                                没有符合查询条件的记录！
                            </td>
                        </tr>
                    </table>
                </EmptyDataTemplate>
            </asp:GridView>
            <div class="page">
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal>&nbsp;&nbsp;&nbsp;&nbsp;
            </div>
            <br />
        </div>
    </div>
    </form>
</body>
</html>
