<%
    //-----------------------------------------------------------
    // 文件名称: User_UserCard_Operate.aspx
    // 页面名称: 会员卡/充值卡/购物卡生成
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-06-13
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.User_UserCard_Operate, V5Shop.Shop.User" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<!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 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" />
    <link href="js/calendar-system.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/Calendar.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                &nbsp;<asp:Label ID="lblPageTitle01" runat="server" Text="【生成" /><asp:Label ID="lblPageTitle02" runat="server" /><asp:Label ID="Label6" runat="server" Text="】" />
                <a id="btnRetrun" href='User_GBook_Manage.aspx' title="返回文章分类管理" runat="server">返回列表</a>
            </div>
        </div>
        <div style="text-align:center;">
            <asp:Panel runat="server" ID="PanelShow" Width="100%">
                <div>
                    <table id="OperateTable" width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                        <tr>
                            <td width="20%" height="30"  align="right" valign="middle">
                          <asp:Label ID="Label1" runat="server" Text="卡内金额："></asp:Label></td>
                            <td width="80%" align="left" valign="middle">
                                <cc1:NumberBox ID="txtPrice" runat="server" MaxLength="8" Value="100" IsInt="True" /></td>
                        </tr>
                        <tr>
                            <td width="20%" height="30"  align="right" valign="middle">
                                <asp:Label ID="Label2" runat="server" Text="发放数量："></asp:Label></td>
                            <td width="80%" align="left" valign="middle">
                                <cc1:NumberBox ID="txtDispenseCount" runat="server" MaxLength="8" value="1"/></td>
                        </tr>
                        <tr>
                            <td width="20%" height="30"  align="right" valign="middle">
                                <cc1:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="最后使用日期" HideSelects="False"
                                    ImageURL="images/help.gif" Text="过了这个期限后,此卡将不能被使用。" />
                                <asp:Label ID="Label3" runat="server" Text="最后使用日期："></asp:Label></td>
                            <td width="80%" align="left" valign="middle">
                                <asp:TextBox ID="txtEndDate" runat="server" ReadOnly="True"></asp:TextBox><img id="ImgDate" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                                <span style="color: #ff0000">*
                                    <asp:RegularExpressionValidator ID="revEndDate" runat="server" ControlToValidate="txtEndDate"
                                        Display="Dynamic" ErrorMessage="请输入日期！" ValidationExpression="^((((1[6-9]|[2-9]\d)\d{2})-(0?[13578]|1[02])-(0?[1-9]|[12]\d|3[01]))|(((1[6-9]|[2-9]\d)\d{2})-(0?[13456789]|1[012])-(0?[1-9]|[12]\d|30))|(((1[6-9]|[2-9]\d)\d{2})-0?2-(0?[1-9]|1\d|2[0-8]))|(((1[6-9]|[2-9]\d)(0[48]|[2468][048]|[13579][26])|((16|[2468][048]|[3579][26])00))-0?2-29-))$( (20|21|22|23|[0-1]?\d):[0-5]?\d:[0-5]?\d$)*"></asp:RegularExpressionValidator></span></td>
                        </tr>
                        <tr>
                            <td width="20%" height="30"  align="right" valign="middle">
                                <cc1:HelpCtrl ID="HelpCtrl3" runat="server" FontColor="red" Header="卡号" HideSelects="False"
                                    ImageURL="images/help.gif" Text="不输入时系统将随机生成一张卡,输入后就按输入的卡号生成卡,生成多张卡时无需输入卡号。" />
                                <asp:Label ID="Label4" runat="server" Text="卡号："></asp:Label></td>
                            <td width="80%" align="left" valign="middle">
                                <asp:TextBox ID="txtNum01" runat="server" MaxLength="4" Width="36px"></asp:TextBox>
                                -
                                <asp:TextBox ID="txtNum02" runat="server" MaxLength="4" Width="36px"></asp:TextBox>
                                -
                                <asp:TextBox ID="txtNum03" runat="server" MaxLength="4" Width="36px"></asp:TextBox>
                                -
                                <asp:TextBox ID="txtNum04" runat="server" MaxLength="4" Width="36px"></asp:TextBox></td>
                        </tr>
                        <tr>
                            <td width="20%" height="30"  align="right" valign="middle">
                                <cc1:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="发放批次" HideSelects="False"
                                    ImageURL="images/help.gif" Text="记录是第几次发的卡,只启记录作用。" />
                                <asp:Label ID="Label9" runat="server" Text="发放批次："></asp:Label></td>
                            <td width="80%" align="left" valign="middle">
                                <asp:TextBox ID="txtDispenseOrder" runat="server" ReadOnly="True" BackColor="Gray" BorderColor="Gray">由系统自动生成</asp:TextBox></td>
                        </tr>
                        <tr>
                            <td align="right" valign="middle" width="20%" style="height: 200px">
                            </td>
                            <td align="left" valign="middle" width="80%" style="height: 200px">
                                &nbsp;<asp:Label ID="Label5" runat="server" ForeColor="Green" Text="<b>提示：</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;为了节省服务器资源，请不要一次性生成太多的卡号，最合适的范围：0-50张<br><br><b>卡号输入规则：</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;卡号是由16位任意数字和字母组成；在卡号后面有四个框可以输入，每个框最多只可输入4个字符。<br><br><b>规则如下：</b><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1. 如4个框都不填写，则系统自动生成16位的卡号；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2. 用户可全部填写，则只能生成一张卡号；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3. 当用户在生成卡号时，后面2个框可以输入“1”，代表按照“0000”的顺序生成卡号；<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4. 用户可以灵活的按照自己的意愿生成卡号。" Width="527px"></asp:Label></td>
                        </tr>
                        <tr>
                            <td align="center" style="text-align: center;" colspan="2">
                                <br />
                                <asp:Button ID="btnAddSubmit" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnAddSubmit_Click" Text="确定" CssClass="button" />
                                <input id="iptReset" runat="server" type="reset" value="重置" class="button" />
                                <asp:Button id="btnReturn" onclick="btnReturn_Click" runat="server" Text="返回列表" CssClass="button" CausesValidation="false" />
                                <br />
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
            <uc2:PageBottom ID="PageBottom1" runat="server" />
        </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>
        <script language="javascript" type="text/javascript">
        Calendar.setup({
            inputField     :    "txtEndDate",
            ifFormat       :    "%Y-%m-%d", 
            button         :    "ImgDate",
            align          :    "Br",
            singleClick    :    true
        });
        </script>
        <cc1:ClientScriptBox ID="JsAlert" runat="server" />
    </form>
    <script type="text/javascript">
            //加TABLE样式
            InitTrClass();
    </script>
</body>
</html>
