<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_shop_BankrollItemView, HoWaveVGO" title="资金明细" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
 <div class="pageTitle">资金明细查询 </div>
 <br />
    <table class="SearchTableStyle">
        <tr>
           <td >用户名称：</td>
           <td ><asp:TextBox ID="TxtUserName" runat="server" Height="16px"/></td>
           <td >起始日期</td>
           <td ><asp:TextBox ID="TxtBeginDate" runat="server" Height="16px"/></td>
 
        </tr>       
        <tr>
           <td >银行：</td>
           <td >
                <asp:DropDownList ID="DropBank" runat="server" AutoPostBack="True">
                </asp:DropDownList>
           </td>
           <td >结束日期</td>
           <td ><asp:TextBox ID="TxtEndDate" runat="server" Height="16px"/></td>
        </tr>
        <tr>
           <td >支出类型：</td>
           <td >
               <asp:DropDownList ID="Dropincome_output" runat="server" AutoPostBack="True">
                    <asp:ListItem Value="-1" Selected="True">所有</asp:ListItem>
                    <asp:ListItem Value="0">收入</asp:ListItem>
                    <asp:ListItem Value="1">支出</asp:ListItem>
                </asp:DropDownList></td>
           <td colspan="2"><asp:Button ID="QuickSearchBtn" Text="查询" runat="server" /></td>
        </tr>
    </table>
    <br />
    <table class="SearchTableStyle">
    <tr><td>
       你现在查看的是：  <asp:DropDownList ID="DropMoneyType" runat="server" AutoPostBack="True">
                    <asp:ListItem Value="-1" Selected="True">所有</asp:ListItem>
                    <asp:ListItem Value="0">现金</asp:ListItem>
                    <asp:ListItem Value="1">汇款</asp:ListItem>
                    <asp:ListItem Value="2">在线支付</asp:ListItem>
                    <asp:ListItem Value="3">虚拟货币</asp:ListItem>
                    <asp:ListItem Value="4">其它</asp:ListItem>
                </asp:DropDownList>
    </td></tr>
    </table>
    <br />
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
        <ContentTemplate>
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1"
        OnDataBound="GridView1_DataBound" AllowPaging="True" AllowSorting="True" CssClass="tableHead">
        <Columns>
             <asp:TemplateField HeaderText="订单号">                
                <ItemTemplate>
                   <a href="Shop_BuyOrder.aspx?OrderFormNum=<%#Eval("OrderFormNum") %>" ><asp:Literal ID="OrderNum" runat="server" Text='<%# Eval("OrderFormNum") %>'/></a>
                </ItemTemplate>
                 <HeaderStyle Width="20%" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="买家">                
                <ItemTemplate>
                   <a href="../../Shop/Shop1/Shop_ShopIntro.aspx?UserID=<%#Eval("UserID") %>" target="_blank"> <asp:Literal ID="SalerName" runat="server" Text='<%# Bind("UserName") %>'/></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="DateAndTime" HeaderText="交易时间" SortExpression="DateAndTime"　 >
                <HeaderStyle Width="8%" />
            </asp:BoundField>
            <asp:BoundField DataField="MoneyType" HeaderText="交易方式"　 >
                <HeaderStyle Width="10%" />
            </asp:BoundField>
            <asp:BoundField DataField="bankname" HeaderText="银行" >
             <HeaderStyle Width="8%" />
            </asp:BoundField>         
            <asp:BoundField DataField="Money" HeaderText="交易金额"　 >
                <HeaderStyle Width="8%" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="交易状态">                
                <ItemTemplate>
                   <a href="Shop_AddPayOrder.aspx?OrderFormNum=<%#Eval("OrderFormNum") %>&ItemID=<%#Eval("ItemID") %>&PayMoney=<%# Eval("Money")%>"> <asp:Literal ID="Status" runat="server" Text='<%# Bind("Status") %>'/></a>
                </ItemTemplate>
            </asp:TemplateField>          
            <asp:BoundField DataField="Remark" HeaderText="备注"　 >              
                <HeaderStyle Width="15%" />
            </asp:BoundField>
        </Columns>
         <EmptyDataTemplate >                   
              <div style="padding:10px;">没有符合查询条件的记录！</div>         
          </EmptyDataTemplate> 
    </asp:GridView>
        </ContentTemplate>
         <Triggers>
        <asp:AsyncPostBackTrigger ControlID="TxtUserName"  />
        <asp:AsyncPostBackTrigger ControlID="TxtBeginDate"  />
        <asp:AsyncPostBackTrigger ControlID="TxtEndDate"  />
        <asp:AsyncPostBackTrigger ControlID="DropBank"  />
        <asp:AsyncPostBackTrigger ControlID="Dropincome_output"  />
        <asp:AsyncPostBackTrigger ControlID="DropMoneyType" />
        </Triggers>
    </asp:UpdatePanel>
    <br />
   <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetBankrollItemByDateIDBankUserIDSalerID"
        TypeName="Shop_BankrollItem">
        <SelectParameters>
            <asp:SessionParameter Name="SalerID" SessionField="Howave_UserID" Type="Int32" DefaultValue="0" />
            <asp:ControlParameter ControlID="TxtUserName" DefaultValue="" Name="UserName" PropertyName="Text"
                Type="String" />
            <asp:ControlParameter ControlID="DropBank" DefaultValue="-1" Name="Bank" PropertyName="SelectedValue"
                Type="Int32" />
            <asp:ControlParameter ControlID="TxtBeginDate" DefaultValue="2006-01-01" Name="BeginDate"
                PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="TxtEndDate" DefaultValue="2500-01-01" Name="EndDate"
                PropertyName="Text" Type="String" />
            
            <asp:ControlParameter ControlID="DropMoneyType" DefaultValue="-1" Name="MoneyType"
                PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="Dropincome_output" DefaultValue="-1" Name="Income_PayOut"
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

