<%@ Page Title="" Language="C#" MasterPageFile="~/Master/officeMaster.master" AutoEventWireup="true"
    CodeFile="Account.aspx.cs" Inherits="Account_Account" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
   <%-- <table class="usertableborder" cellspacing="1" cellpadding="3" width="100%" align="center"
        border="0">
        <tr>
            <th>
                全部账户
            </th>
        </tr>
    </table>--%>
    <div style="font-size:15px;">
               <asp:Button ID="btnAllAccount" runat="server" Text="全部" 
                   Style="font-weight: bold;width: 80px; height: 30px;" 
                   onclick="btnAllAccount_Click"/>
               <asp:Button ID="btnCashAccount" runat="server" Text="现金" 
                   Style="width: 80px; height: 30px;" onclick="btnCashAccount_Click" />
               <asp:Button ID="btnCreditCard" runat="server" Text="信用卡" 
                   Style="width: 80px; height: 30px;" onclick="btnCreditCard_Click" />
               <asp:Button ID="btnSavingsCard" runat="server" Text="储蓄卡" 
                   Style="width: 80px; height: 30px;" onclick="btnSavingsCard_Click" />
               <asp:Button ID="btnOnlinPay" runat="server" Text="网上支付" 
                   Style="width: 80px; height: 30px;" onclick="btnOnlinPay_Click" />
               <asp:Button ID="btnLoan" runat="server" Text="借贷账户" 
                   Style="width: 80px; height: 30px;" onclick="btnLoan_Click" />&nbsp;&nbsp;&nbsp;&nbsp;
               <asp:Button ID="btnAddAccount" runat="server" Text="新增" Width="80" Height="30" onclick="btnAddAccount_Click" />
    </div>
    <br />
    <table class="usertableborder" cellspacing="1" cellpadding="3" width="40%" align="center"
        border="1">
        <tr>
            <th width="35%">
                名称
            </th>
            <th width="35%">
                当前余额
            </th>
            <th width="30%">
                操作
            </th>
        </tr>
        <tr>
            <td colspan="3" align="center">
                现金
            </td>
        </tr>
        <asp:Repeater ID="rptCashAccount" runat="server" 
            onitemcommand="rptCashAccount_ItemCommand" 
            onitemdatabound="rptCashAccount_ItemDataBound">
            <ItemTemplate>
                <tr align="center"  onmousemove="this.style.backgroundColor='#0099CC'" onmouseout="this.style.backgroundColor='white'">
                    <td>
                        <%#Eval("CashAccountName")%>
                    </td>
                    <td>
                        ￥<%#Eval("CashRemainder")%></td>
                    <td>
                        <asp:HiddenField ID="hfCashAccountId" runat="server" Value='<%#Eval("CashAccountId") %>' />
                        <asp:HiddenField ID="hfCashBlockState" runat="server" Value='<%#Eval("State") %>' />
                        <%--<asp:LinkButton ID="lbtnDetail" runat="server" Text="查看明细" CommandArgument="selectDetail"></asp:LinkButton>--%>
                        <asp:LinkButton ID="lbtnEditCash" runat="server" Text="编辑" CommandName="edit"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnBlockCash" runat="server" Text="停用" CommandName="block"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td colspan="3" align="center">
                信用卡
            </td>
        </tr>
        <asp:Repeater ID="rptCreditCard" runat="server" 
            onitemcommand="rptCreditCard_ItemCommand" 
            onitemdatabound="rptCreditCard_ItemDataBound">
            <ItemTemplate>
                <tr align="center" onmousemove="this.style.backgroundColor='#0099CC'" onmouseout="this.style.backgroundColor='white'">
                    <td>
                        <%#Eval("CreditCardName")%>
                    </td>
                    <td>
                       欠款：￥<%#Eval("CardArrears")%></td>
                    <td>
                        <asp:HiddenField ID="hfCreditCardId" runat="server" Value='<%#Eval("CreditCardId") %>' />
                        <asp:HiddenField ID="hfCreditCardBlockState" runat="server" Value='<%#Eval("State") %>' />
                       <%-- <asp:LinkButton ID="lbtnDetail" runat="server" Text="查看明细" CommandArgument="selectDetail"></asp:LinkButton>--%>
                        <asp:LinkButton ID="lbtnEditCreditCard" runat="server" Text="编辑" CommandName="edit"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnBlockCreditCard" runat="server" Text="停用" CommandName="block"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td colspan="3" align="center">
                储蓄卡
            </td>
        </tr>
        <asp:Repeater ID="rptSavingsCard" runat="server" 
            onitemcommand="rptSavingsCard_ItemCommand"
            onitemdatabound="rptSavingsCard_ItemDataBound">
            <ItemTemplate>
                <tr align="center" onmousemove="this.style.backgroundColor='#0099CC'" onmouseout="this.style.backgroundColor='white'">
                    <td>
                        <%#Eval("SavingsCardName")%>
                    </td>
                    <td>
                        ￥<%#Eval("SavingsCardRemainder")%></td>
                    <td>
                        <asp:HiddenField ID="hfSavingsCardId" runat="server" Value='<%#Eval("SavingsCardId") %>' />
                        <asp:HiddenField ID="hfSavingsCardState" runat="server" Value='<%#Eval("State") %>' />
                        <%--<asp:LinkButton ID="lbtnDetail" runat="server" Text="查看明细" CommandArgument="selectDetail"></asp:LinkButton>--%>
                        <asp:LinkButton ID="lbtnEditSavingsCard" runat="server" Text="编辑" CommandName="edit"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnBlockSavingsCard" runat="server" Text="停用" CommandName="block"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td colspan="3" align="center">
                网上支付
            </td>
        </tr>
        <asp:Repeater ID="rptOnlinePay" runat="server" 
            onitemcommand="rptOnlinePay_ItemCommand" 
            onitemdatabound="rptOnlinePay_ItemDataBound">
            <ItemTemplate>
                <tr align="center" onmousemove="this.style.backgroundColor='#0099CC'" onmouseout="this.style.backgroundColor='white'">
                    <td>
                        <%#Eval("OnlinePayName") %>
                    </td>
                    <td>
                        ￥<%#Eval("OnlinePayRemainder") %></td>
                    <td>
                        <asp:HiddenField ID="hdOnlinePayId" runat="server" Value='<%#Eval("OnlinePayId") %>' />
                        <asp:HiddenField ID="hdOnlinPayState" runat="server" Value='<%#Eval("State") %>' />
                        <%--<asp:LinkButton ID="lbtnDetail" runat="server" Text="查看明细" CommandArgument="selectDetail"></asp:LinkButton>--%>
                        <asp:LinkButton ID="lbtnEditOnlinePay" runat="server" Text="编辑" CommandName="edit"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnBlockOnlinePay" runat="server" Text="停用" CommandName="block"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td colspan="3" align="center">
                借贷账户
            </td>
        </tr>
        <asp:Repeater ID="rptLoanAccount" runat="server" 
            onitemcommand="rptLoanAccount_ItemCommand" 
            onitemdatabound="rptLoanAccount_ItemDataBound">
            <ItemTemplate>
                <tr align="center" onmousemove="this.style.backgroundColor='#0099CC'" onmouseout="this.style.backgroundColor='white'">
                    <td>
                        <%#Eval("LoanAccountName")%>
                    </td>
                    <td>
                         <%#GetRemainderState(Eval("LoanRemainder"))%>
                    </td>
                    <td>
                        <asp:HiddenField ID="hfLoanAccountId" runat="server" Value='<%#Eval("LoanAccountId") %>' />
                        <asp:HiddenField ID="hfLoanState" runat="server" Value='<%#Eval("State") %>' />
                        <%--<asp:LinkButton ID="lbtnDetail" runat="server" Text="查看明细" CommandArgument="selectDetail"></asp:LinkButton>--%>
                        <asp:LinkButton ID="lbtnEditLoanAccount" runat="server" Text="编辑" CommandName="edit"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnBlockLoanAccount" runat="server" Text="停用" CommandName="block"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
    </table>
</asp:Content>
