<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Product_VirtualCard_Manage, V5Shop.Shop.Payment" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="js/Control_Calendar.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <uc3:ManageHeader ID="ManageHeader1" runat="server" />
        <div>
            <div id="search">
                <div style="padding: 10px 20px; border: 1px #eeeeee solid; background: #f7f7f7">
                    <asp:Label ID="lblCardNum" runat="server" Text="卡号："></asp:Label><asp:TextBox ID="txtSearchCardNum"
                        Width="100px" runat="server" class="input"></asp:TextBox>
                    <asp:Label ID="lblOrderNum" runat="server" Text="订单号："></asp:Label><asp:TextBox ID="txtOrderNum"
                        runat="server"></asp:TextBox>
                    <asp:Label ID="lblProductName" runat="server" Text="商品名称："></asp:Label><asp:TextBox
                        ID="txtSearchProductName" runat="server"></asp:TextBox>
                    <asp:Button ID="btnSearch" runat="server" Text="查询" OnClick="btnSearch_Click" class="button" CausesValidation="False" /></div>
            </div>
            <div id="content">
                <div style="padding: 3px 25px; color: #4B6888; border-bottom: 1px #CCCCCC solid">
                    <input type="checkbox" id="CheckAllBox" onclick="CheckAll()" class="checkbox" />
                    全选
　
<asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" OnClick="btnAdd_Click"
                        CausesValidation="False"><img src="images/icon/key_add.gif" /> 添加</asp:LinkButton>
　
<asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" OnClick="btnEdit_Click"
                        OnClientClick="return CheckEdit()" CausesValidation="False"><img src="images/icon/key_edit.gif" /> 编辑</asp:LinkButton>
　
<asp:LinkButton ID="btnDel" runat="server" ForeColor="#4B6888" OnClick="btnDel_Click"
                        OnClientClick="return CheckDel()" CausesValidation="False"><img src="images/icon/key_delete.gif" /> 删除</asp:LinkButton>
                </div>
                <div>
                    <span class="listborder">
                        <V5Shop:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True"
                            AutoGenerateColumns="False" CssClass="datalist" HeaderStyle-Height="18px" HeaderStyle-ForeColor="#000"
                            EmptyDataText="没有查询到任何记录" TableName="VirtualCard" CacheName="VirtualCard" PageSize="12"
                            BorderWidth="0px" GridLines="None" Width="100%">
                            <Columns>
                                <asp:TemplateField>
                                    <itemstyle horizontalalign="Center" width="3%" />
                                    <itemtemplate>
                            <input runat="server" Value='<%# Eval("ID") %>' ID="CheckBoxID" type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" mouse="out" class="checkbox"/>
							</itemtemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="id" SortExpression="ID" HeaderText="ID">
                                    <itemstyle width="6%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="ProductName" SortExpression="ProductName" HeaderText="所属商品">
                                    <itemstyle width="20%" />
                                </asp:BoundField>
                                <asp:BoundField DataField="Number" HeaderText="卡号" SortExpression="Number" />
                                <asp:BoundField DataField="Date" HeaderText="录入时间" SortExpression="Date" />
                                <asp:TemplateField HeaderText="是否出售" SortExpression="IsSold">
                                    <itemtemplate>
									<asp:Label runat="server" Text='<%# IsSolded(DataBinder.Eval(Container,"DataItem(IsSold)","{0}")) %>' id="Label2"></asp:Label>
							</itemtemplate>
                                </asp:TemplateField>
                                <asp:BoundField DataField="OrderNumber" HeaderText="销售订单" SortExpression="OrderNumber" />
                                <asp:BoundField DataField="SoldDate" HeaderText="销售日期" SortExpression="SoldDate" />
                            </Columns>
                            <PagerSettings Mode="NumericFirstLast" />
                            <HeaderStyle CssClass="category" ForeColor="Black" Height="18px" />
                        </V5Shop:V5ShopGridView>
                    </span>
                    <asp:Panel ID="ShowADD" runat="server" Visible="false">
                        <div align="center" style="background: #f1f1f1">
                            <table width="500">
                                <tr id="trSearchProduct" runat="server">
                                    <td style="width: 20%" align="right">
                                        <asp:Label ID="lblSearchProduct" runat="server" Text="搜索商品："></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtProductName" runat="server" Width="300px"></asp:TextBox>
                                        <asp:Button ID="btnSearchProduct" runat="server" CausesValidation="False" CssClass="button"
                                            OnClick="btnSearchProduct_Click" Text="搜索" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 20%">
                                        <asp:Label ID="lblProduct" runat="server" Text="所属商品："></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:DropDownList ID="ddlProductID" runat="server" Width="150px">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr id="trNumber" runat="server">
                                    <td align="right" style="width: 20%">
                                        <asp:Label ID="lblCardNumber" runat="server" Text="卡号："></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox ID="txtCardNumber" runat="server" Width="200px" MaxLength="100"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="不能为空"
                                            ControlToValidate="txtCardNumber" Display="Dynamic"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtCardNumber"
                                                Display="Dynamic" ErrorMessage="只能为字符" ValidationExpression="^[\x00-\xff]+$"></asp:RegularExpressionValidator></td>
                                </tr>
                                <tr id="trPassword" runat="server">
                                    <td align="right" style="width: 20%; height: 25px;">
                                        <asp:Label ID="lblCardPassWord" runat="server" Text="密码："></asp:Label>
                                    </td>
                                    <td align="left" style="height: 25px">
                                        <asp:TextBox ID="txtCardPassWord" runat="server" TextMode="Password" Width="200px"
                                            MaxLength="100"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="不能为空"
                                            ControlToValidate="txtCardPassWord" Display="Dynamic"></asp:RequiredFieldValidator><asp:RegularExpressionValidator
                                                ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtCardPassWord"
                                                Display="Dynamic" ErrorMessage="只能为字符" ValidationExpression="^[\x00-\xff]+$"></asp:RegularExpressionValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 20%">&nbsp;
                                        
                                    </td>
                                    <td align="left">
                                        <asp:CheckBox ID="cbFileUp" runat="server" AutoPostBack="True" CssClass="checkboxaspx"
                                            Text="批量上传" OnCheckedChanged="cbFileUp_CheckedChanged" /></td>
                                </tr>
                                <tr id="trFileUp" runat="server" visible="false">
                                    <td align="right" style="width: 100px">
                                        <V5Shop:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="批量上传" ImageURL="images/help.gif"
                                            Text="注意：请用纯文本格式（txt文档）上传，每行一个卡号和密码。卡号密码之间用英文 , 隔开" />
                                        <asp:Label ID="lblUploadArr" runat="server" Text="批量上传："></asp:Label></td>
                                    <td align="left">
                                        <asp:FileUpload ID="fuCardNumber" runat="server" Width="300px" /><a href="../template/card.rar" target="_blank"><font color="#ff0000">下载示例</font></a></td>
                                </tr>
                                <tr>
                                    <td style="width: 20%">
                                    </td>
                                    <td align="left">
                                        <asp:Button ID="btnAddT" runat="server" Text="确定" Visible="true" CssClass="button"
                                            OnClick="btnAddT_Click" />
                                        <asp:Button ID="btnEditT" runat="server" Text="更新" Visible="false" CssClass="button"
                                            OnClick="btnEditT_Click" /></td>
                                </tr>
                            </table>
                        </div>
                    </asp:Panel>
                </div>
            </div>
            <div id="hiddenfield">
                <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
                <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
                <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
                <uc1:HiddenField ID="Alert" runat="server" />
            </div>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </div>
    </form>
</body>
</html>
