<%@ Page Title="明细_支出" Language="C#" MasterPageFile="~/Master/officeMaster.master"
    AutoEventWireup="true" CodeFile="Detail_Expenditure.aspx.cs" Inherits="A_Detail_Detail_Expenditure"
    EnableEventValidation="false" %>

<%@ Register Src="~/Ucontrol/UcAccount.ascx" TagName="Account" TagPrefix="ucl" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
</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>
        <asp:Button ID="btnAllDetail" runat="server" Text="全 部" Style="
            width: 80px; height: 30px;" OnClick="btnAllDetail_Click" />
        <asp:Button ID="btnExpenditure" runat="server" Text="支 出" Style="font-weight: bold;
            width: 80px; height: 30px;" OnClick="btnExpenditure_Click" />
        <asp:Button ID="btnIncome" runat="server" Text="收 入" Style="width: 80px; height: 30px;"
            OnClick="btnIncome_Click" />
        <asp:Button ID="btnTransfer" runat="server" Text="转 账" Style="width: 80px; height: 30px;"
            OnClick="btnTransfer_Click" />
        <asp:Button ID="btnLoan" runat="server" Text="借 贷" Style="width: 80px; height: 30px;"
            OnClick="btnLoan_Click" />
    </div>
    <br />
    <table class="usertableborder" cellspacing="1" cellpadding="3" width="100%" align="center"
        border="0">
        <tr>
            <td>
                从
                <asp:TextBox ID="txtStateTime" runat="server" onfocus="WdatePicker()" Width="140"></asp:TextBox>
                到
                <asp:TextBox ID="txtEndTime" runat="server" onfocus="WdatePicker()" Width="140"></asp:TextBox>
                支出总额：￥<span id="spanExpenditureCount" runat="server"></span>
            </td>
        </tr>
        <tr>
            <td>
                账户：<ucl:Account ID="uclAccount" runat="server" OpenAjaxUrl="../Ajax/Ajax_CreditCard.aspx"
                    OpenSavingsCardAjaxUrl="../Ajax/Ajax_SavingsCard.aspx" />
                类型：<asp:DropDownList ID="ddlExpenditureType" runat="server">
                    <asp:ListItem Text="请选择类型" Value="0"></asp:ListItem>
                </asp:DropDownList>
                项目：<asp:DropDownList ID="ddlProject" runat="server">
                    <asp:ListItem Text="请选择项目" Value="0"></asp:ListItem>
                </asp:DropDownList>
                商家：<asp:DropDownList ID="ddlSeller" runat="server">
                    <asp:ListItem Text="请选择商家" Value="0"></asp:ListItem>
                </asp:DropDownList>
                <asp:Button ID="btnSelect" runat="server" Text="查 询" Width="72" BackColor="#CCCCCC" OnClick="btnSelect_Click" />
            </td>
        </tr>
    </table>
    <br />
    <table class="usertableborder" cellspacing="1" cellpadding="3" width="90%" border="0">
        <tr>
            <td width="20%">
                时间
            </td>
            <td width="10%">
                |金额
            </td>
            <td width="10%">
                |类别
            </td>
            <td width="15%">
                |商家
            </td>
            <td width="10%">
                |账户
            </td>
            <td width="20%">
                |备注
            </td>
            <td width="15%">
                |操作
            </td>
        </tr>
        <asp:Repeater ID="rptDetailExpenditure" runat="server" OnItemCommand="rptDetailExpenditure_ItemCommand">
            <ItemTemplate>
                <tr onmousemove="this.style.backgroundColor='#0099CC'" onmouseout="this.style.backgroundColor='white'">
                    <td>
                        <%#Eval("RExpenditureDateTime")%>
                    </td>
                    <td style="color: Red;">
                        ￥<%#Eval("RExpenditureMoney")%></td>
                    <td>
                        <%#Eval("ExpenditureTypeName")%>
                    </td>
                    <td>
                        <%#Eval("SellerName")%>
                    </td>
                    <td>
                       <%#Eval("REAccountName")%>
                    </td>
                    <td>
                        <%#Eval("RExpenditureRemarks")%>
                    </td>
                    <td>
                        <asp:HiddenField ID="hfRecordExpenditureId" runat="server" Value='<%#Eval("RecordExpenditureId") %>' />
                        <asp:HiddenField ID="hfREAccountTypeId" runat="server" Value='<%#Eval("REAccountTypeId") %>' />
                        <asp:HiddenField ID="hfREAccountId" runat="server" Value='<%#Eval("REAccountId") %>' />
                        <asp:HiddenField ID="hfRExpenditureMoney" runat="server" Value='<%#Eval("RExpenditureMoney") %>' />
                        <asp:LinkButton ID="lbtnEdit" runat="server" CommandName="edit" Text="编辑"></asp:LinkButton>
                        <asp:LinkButton ID="lbtnDelete" runat="server" CommandName="delete" Text="删除" OnClientClick="return confirm('确认要删除吗？')"></asp:LinkButton>
                    </td>
                </tr>
            </ItemTemplate>
        </asp:Repeater>
        <tr>
            <td colspan="7" align="center">
                <span>当前<span id="spanPageCurrent" runat="server">1</span>/<span id="spanPageCount"
                    runat="server"></span>页</span>
                <asp:LinkButton ID="lbtnPageFirst" runat="server" Text="首页" BackColor="Silver" Width="56px" OnClick="lbtnPageFirst_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtnPageUp" runat="server" Text="上页" BackColor="Silver" Width="56px" OnClick="lbtnPageUp_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtnPageDown" runat="server" Text="下页" BackColor="Silver" Width="56px" OnClick="lbtnPageDown_Click"></asp:LinkButton>
                <asp:LinkButton ID="lbtnPageLast" runat="server" Text="末页" BackColor="Silver" Width="56px" OnClick="lbtnPageLast_Click"></asp:LinkButton>
            </td>
        </tr>
    </table>
</asp:Content>
