<%
    //-----------------------------------------------------------
    // 文件名称: Promotions_Coupon_Operate.aspx
    // 页面名称: 优惠券添加/编辑
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-06-23
    //-----------------------------------------------------------
%>

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

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="V5" %>
<!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>
                <asp:Label ID="lblPageTitle01" runat="server" Text="【生成优惠券】" />
                <asp:HyperLink ID="lblReturn" runat="server" Text="返回列表" />
            </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 class="F7tr">
                            <td style="width: 20%; height: 30px; text-align: right">
                                <asp:Label ID="Label1" runat="server" Text="优惠券名称："></asp:Label></td>
                            <td style="width: 80%; text-align: left">
                                <asp:TextBox ID="txtName" runat="server" MaxLength="50"></asp:TextBox>
                                <span style="color: #ff0000">*</span>
                                <asp:RequiredFieldValidator ID="rfvName" runat="server" ErrorMessage="必须输入." ControlToValidate="txtName" Display="Dynamic"></asp:RequiredFieldValidator></td>
                        </tr>
                        <tr class="FFtr">
                            <td style="width: 20%; height: 30px; text-align: right">
                                <V5:HelpCtrl ID="HelpCtrl5" runat="server" FontColor="red" Header="面值" HideSelects="False" ImageURL="images/help.gif" Text="优惠券的面值,即能抵的金额。" />
                                <asp:Label ID="Label7" runat="server" Text="面值："></asp:Label></td>
                            <td style="width: 80%; text-align: left">
                                <V5:NumberBox ID="txtMinusPrice" runat="server" IsInt="True" />
                            </td>
                        </tr>
                        <tr class="F7tr">
                            <td style="width: 20%; height: 30px; text-align: right">
                                <V5:HelpCtrl ID="HelpCtrl7" runat="server" FontColor="red" Header="启用状态" HideSelects="False" ImageURL="images/help.gif" Text="设置为启用的优惠券才能被使用。" />
                                <asp:Label ID="Label8" runat="server" Text="启用状态："></asp:Label></td>
                            <td style="width: 80%; text-align: left">
                                <asp:RadioButtonList ID="rblActvice" runat="server" RepeatDirection="Horizontal" CssClass="input2">
                                    <asp:ListItem Value="1">启用</asp:ListItem>
                                    <asp:ListItem Selected="True" Value="0">未启用</asp:ListItem>
                                </asp:RadioButtonList></td>
                        </tr>
                        <tr class="FFtr">
                            <td style="width: 20%; height: 30px; text-align: right">
                                <V5:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="生成数量" HideSelects="False" ImageURL="images/help.gif" Text="此次生成优惠券生成的数量,例如:面值设为100,生成数量设为10,就支生成10张面值100的优惠券。" />
                                <asp:Label ID="Label2" runat="server" Text="生成数量："></asp:Label></td>
                            <td style="width: 80%; text-align: left">
                                <V5:NumberBox ID="txtCount" runat="server" />
                            </td>
                        </tr>
                        <tr class="F7tr">
                            <td style="width: 20%; height: 30px; text-align: right">
                                <V5:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="使用时间" HideSelects="False" ImageURL="images/help.gif" Text="优惠券使用的时间,优惠券只有在这个时间范围内才能使用。" />
                                <asp:Label ID="Label3" runat="server" Text="使用时间："></asp:Label></td>
                            <td style="width: 80%; text-align: left">
                                <asp:TextBox ID="txtStartDate" runat="server" onblur="return CheckDate(this, true, false);" /><img id="ImgStartDate" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                                - &nbsp;<asp:TextBox ID="txtEndDate" runat="server" onblur="return CheckDate(this, true, false);" /><img id="ImgEndDate" alt="打开日历" src="images/calendar1.gif" title="打开日历" /></td>
                        </tr>
                        <tr class="FFtr">
                            <td style="width: 20%; height: 30px; text-align: right">
                                <V5: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 style="width: 80%; text-align: left">
                                <asp:CheckBoxList ID="lstUserGroup" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" CssClass="input2">
                                </asp:CheckBoxList></td>
                        </tr>
                        <tr class="F7tr">
                            <td style="width: 20%; height: 30px; text-align: right">
                                <V5:HelpCtrl ID="HelpCtrl4" runat="server" FontColor="red" Header="最低购买金额" HideSelects="False" ImageURL="images/help.gif" Text="购买的物品的商品总金额大于这个数才能使用该优惠券。" />
                                <asp:Label ID="Label9" runat="server" Text="最低购买金额："></asp:Label></td>
                            <td style="width: 80%; text-align: left">
                                <V5:NumberBox ID="txtNeedPrice" runat="server" Value="" />
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 20%; height: 30px; text-align: right">
                                <V5:HelpCtrl ID="HelpCtrl6" runat="server" FontColor="red" Header="关联商品" HideSelects="False" ImageURL="images/help.gif" Text="被关联过的商品才能使用该优惠券,如果不关联商品表示购买任何商品都可以使用该优惠券。" />
                                <asp:Label ID="Label5" runat="server" Text="关联商品："></asp:Label></td>
                            <td style="width: 80%; text-align: left">
                                <V5:SelectListBox ID="slbProductID" runat="server" CategoryHeaderText="商品分类:" DescHeaderText="选定的商品" Height="200px" SrcHeaderText="待选的商品" Width="374px" />
                            </td>
                        </tr>
                        <tr class="F7tr">
                            <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="PageBottom" runat="server" />
        </div>
        <div id="hiddenfield">
            <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     :    "txtStartDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "ImgStartDate",
	        align          :    "Br",
	        singleClick    :    true
        });
        Calendar.setup({
	        inputField     :    "txtEndDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "ImgEndDate",
	        align          :    "Br",
	        singleClick    :    true
        });
        </script>
    </form>
</body>
</html>
