<%@ page title="" language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_MBF_UserCardRecode, WebApp_deploy" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPHead" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="pageTitle">
        <font color="red">卡和中奖券使用记录查询</font></div>
    <br />
        <table class="SearchTableStyle">
    <tr>
            <td colspan="4">
                <b>2、查询条件</b>
            </td>
        </tr>
        <tr>
            <td style="width: 120px; padding-left: 20px;">
                卡类别：<asp:DropDownList ID="DropType" OnSelectedIndexChanged="Search_OnClick" runat="server"
                    AutoPostBack="true">
                    <asp:ListItem Text="VIP卡" Value="-1"></asp:ListItem>
                    <asp:ListItem Text="礼品卡" Value="-2"></asp:ListItem>
                    <asp:ListItem Text="中奖券" Value="-3"></asp:ListItem>
                </asp:DropDownList>
            </td>
            <td style="width: 280px; ">
                CardNumber：<asp:TextBox ID="txtCardNumber" runat="server" AutoPostBack="true" 
                    ontextchanged="Search_OnClick"></asp:TextBox>
            </td>
            <td style="width: 300px; padding-left: 20px;">
                使用日期：<asp:TextBox runat="server" ID="begindate" Width="75px" Height="16px" 
                    AutoPostBack="true" ontextchanged="Search_OnClick" />
                ~
                <asp:TextBox runat="server" ID="EndDate" Width="75px" Height="16px" 
                    AutoPostBack="true" ontextchanged="Search_OnClick" />
                    </td>
             <td>
                <asp:Button ID="sb" runat="server" Text="查 询" OnClick="Search_OnClick" />&nbsp;
                <input id="Button1" type="button" value="返回" onclick="history.back();" />
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
        AllowPaging="True" PageSize="15" CssClass="tableHead">
        <Columns>
        <asp:BoundField ReadOnly="True" DataField="id" HeaderText="编号" ItemStyle-Width="120px">
            </asp:BoundField>
            <asp:TemplateField HeaderText="卡类型" ItemStyle-Width="200px">
                <ItemTemplate>
                    <asp:Label ID="CardType" runat="server" Text='<%#GetCardType(Eval("CardType")) %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField ReadOnly="True" DataField="CardNumber" HeaderText="卡号" ItemStyle-Width="180px">
            </asp:BoundField>
            <asp:TemplateField HeaderText="使用者" ItemStyle-Width="200px">
                <ItemTemplate>
                    <asp:Label ID="UserID" runat="server" Text='<%#GetUserNameByid(Eval("UserID")) %>' />
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Amount" HeaderText="使用的金额" ItemStyle-Width="100px"></asp:BoundField>
            <asp:BoundField ReadOnly="True" DataField="UserTime" DataFormatString="{0:D}" HeaderText="发生时间"></asp:BoundField>
            <asp:BoundField ReadOnly="True" DataField="Remark" HeaderText="使用说明"></asp:BoundField>
        </Columns>
        <EmptyDataTemplate>
            <table class="tableHearder" style="width: 98%">
                <tr>
                <th>
                        编号
                    </th>
                    <th>
                        卡类型
                    </th>
                    <th>
                        卡号
                    </th>
                    <th>
                        使用者
                    </th>
                    <th>
                        使用的金额
                    </th>
                    <th>
                        发生时间
                    </th>
                    <th>
                        使用说明
                    </th>
                </tr>
                <tr>
                    <td colspan="7">
                        没有符合查询条件的记录
                    </td>
                </tr>
            </table>
        </EmptyDataTemplate>
    </asp:GridView>
</asp:Content>

