<%@ Page Title="" Language="C#" MasterPageFile="Freight.Master" AutoEventWireup="true" CodeBehind="TransferAccount.aspx.cs" Inherits="GxHub.Wms.Abroad.Web.Freight.TransferAccount" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">

        $(function () {

            $("#checkboxAll").click(function () {
                var that = $(this);
                $(".check").each(function () {
                    $(this).prop("checked", that.prop("checked"))

                })

            })

        })
        function Validate() {

            var count = $(".check:checked").length;
            if (count == 0) {
                alert("请勾选用户");
                return false;
            }
            if (count > 1) {
                alert("只能勾选一个用户");
                return false;
            }
            return true;
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <yee:PageTitle ID="title" runat="server">
        <ShortCuts>
            <%-- <a href="BalanceList.aspx" id="btnReturn" class="button"><%=GetText("返回列表")%></a>--%>
        </ShortCuts>
    </yee:PageTitle>
    <yee:MessageBox ID="msg" runat="server">
    </yee:MessageBox>
    <div class="query">
        <table cellpadding="0" cellspacing="0" border="0">
            <tr>
                <td class="queryLeft" width="100px">
                    <%=GetText("客户代号")%>：
                </td>
                <td class="queryRight">
                    <asp:TextBox ID="txtCode" runat="server" Width="120px"></asp:TextBox>
                </td>
                <td class="queryLeft">
                    <%=GetText("电话")%>：
                </td>
                <td class="queryRight">
                    <asp:TextBox ID="txtTel" runat="server" Width="120px"></asp:TextBox>
                </td>
                <td class="queryLeft" style="float: right">
                    <yee:Button ID="btnSearch" runat="server" Width="100px" CssClass="button" OnClick="btnSearch_Click" />
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:Repeater ID="rptList" runat="server" OnItemCommand="rptList_ItemCommand">
            <HeaderTemplate>
                <table cellpadding="0" cellspacing="0" border="0" class="table" style="width: 100%;">
                    <tr>
                        <td class="tbheader">
                            <%=GetText("")%>
                        </td>
                        <td class="tbheader">
                            <%=GetText("客户名称")%>
                        </td>
                        <td class="tbheader">
                            <%=GetText("客户代号")%>
                        </td>
                        <td class="tbheader">
                            <%=GetText("邮箱")%>
                        </td>
                        <td class="tbheader">
                            <%=GetText("电话")%>
                        </td>

                        <td class="tbheader">
                            <%=GetText("注册日期")%>
                        </td>
                        <td class="tbheader">
                            <%=GetText("业务员")%>
                        </td>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="tbrow">
                    <td class="tbpost">
                        <asp:LinkButton runat="server" ID="lbnAdd" CommandArgument='<%# Eval("CustomerId")%>' CommandName="add" Text="选中当前客户"></asp:LinkButton>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CustomerName")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CustomerCode")%>
                    </td>
                    <td class="tbpost">
                        <%#Eval("Email")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Mobile")%>
                    </td>

                    <td class="tbpost">
                        <%# Eval("CreatedOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SalesName")%>
                    </td>
                </tr>
            </ItemTemplate>
            <AlternatingItemTemplate>
                <tr class="tbrowalter">
                    <td class="tbpost">
                        <asp:LinkButton runat="server" ID="lbnAdd" CommandArgument='<%# Eval("CustomerId")%>' CommandName="add" Text="选中当前客户"></asp:LinkButton>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CustomerName")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("CustomerCode")%>
                    </td>
                    <td class="tbpost">
                        <%#Eval("Email")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("Mobile")%>
                    </td>

                    <td class="tbpost">
                        <%# Eval("CreatedOn","{0:d}")%>
                    </td>
                    <td class="tbpost">
                        <%# Eval("SalesName")%>
                    </td>
                </tr>
            </AlternatingItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
    </div>
    <table class="table" cellpadding="0" cellspacing="0" border="0">

        <tr>
            <td class="tbpostheader">
                <%=GetText("客户代号") %>：
            </td>
            <td class="tbpost" colspan="3">
                <asp:Label runat="server" ID="lbCode"></asp:Label>
                <asp:HiddenField ID="hfCustomerId" runat="server" />
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("转账金额") %>：
            </td>
            <td class="tbpost" colspan="3">
                <asp:TextBox runat="server" ID="txtAmount" Text='<%# Eval("amount")%>'></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="tbpostheader">
                <%=GetText("前台账号") %>：
            </td>
            <td class="tbpost" colspan="3">

                <asp:Label ID="labAgentCustomer" runat="server"></asp:Label>
                <%=GetText("余额") %>：<asp:Label runat="server" ID="lbBalance"></asp:Label>
            </td>
        </tr>

        <tr>
            <td class="tbpostheader"></td>
            <td class="tbpost" colspan="3">
                <asp:Button runat="server" ID="lbnTransfer" OnClick="lbnTransfer_Click" CssClass="button" OnClientClick='return confirm("确认转账吗？")'></asp:Button>
            </td>
        </tr>
    </table>
</asp:Content>