<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_BuyCard, HoWaveVGO" title="Untitled Page" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <div class="pageTitle">充值卡管理</div>
    <br />
    <table class="SearchTableStyle">
        <tr>
            <td>
                你现在查看的是：<asp:DropDownList ID="DropMoment" runat="server" AutoPostBack="True">
                    <asp:ListItem Selected="True" Value="0">可购买的卡</asp:ListItem>
                    <asp:ListItem Value="1">使用中的卡</asp:ListItem>
                    <asp:ListItem Value="2">已拥有的卡</asp:ListItem>
                    <asp:ListItem Value="3">失效的卡</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
    </table>
    <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
        CssClass="tableHead" DataKeyNames="CardID" DataSourceID="ObjectDataSource1"
        EmptyDataText="对不起，没有找到符合你查询条件的记录" ForeColor="Black" OnDataBound="GridView1_DataBound" ShowFooter="True">
        <FooterStyle BackColor="#D3E7F6" BorderColor="#FFE0C0" />
        <Columns>
            <asp:BoundField DataField="CardID" HeaderText="自动编号" />
            <asp:BoundField DataField="CardNum" HeaderText="卡号" />
            <asp:BoundField DataField="CardPassword" HeaderText="密码" />
            <asp:BoundField DataField="CardMoney" HeaderText="面值" />
            <asp:BoundField DataField="CardState" HeaderText="状态" />
            <asp:BoundField DataField="CardEndDate" HeaderText="有效时间" />
            <asp:TemplateField HeaderText="购买">
            <ItemTemplate>
                &nbsp;<asp:Button ID="Butgetcard" runat="server" OnCommand="EventGetCard" Text="充值" />
            </ItemTemplate></asp:TemplateField>
        </Columns>
    </asp:GridView>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCardByStatus"
        TypeName="CardBLL">
        <SelectParameters>
            <asp:ControlParameter ControlID="DropMoment" DefaultValue="3" Name="Status" PropertyName="SelectedValue"
                Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

