<%
    //-----------------------------------------------------------
    // 文件名称: Promotions_Activity_Operate.aspx
    // 页面名称: 优惠活动添加/编辑
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-06-26
    // 修改标识: Add By 钟治宇   2008-12-3  
   //　　添加了两个按件  
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Promotions_Activity_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-zh.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>
    <script type="text/javascript" src="editor/fckeditor.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【优惠活动添加】" />
                <asp:Label ID="lblEdit" runat="server" Text="【优惠活动编辑】" />
                <asp:HyperLink ID="lkReturn" 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" runat="server">
                        <tr class="F7tr">
                            <td height="30" align="right" width="20%">
                                <asp:Label ID="Label1" runat="server" Text="优惠活动名称："></asp:Label></td>
                            <td width="80%" align="left">
                                <asp:TextBox ID="txtName" runat="server" Width="300px" MaxLength="50" />
                                
                                 <span class="NeedMsg">*</span>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtName"
                                    ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                
                                
                                </td>
                        </tr>
                        <tr class="FFtr">
                            <td align="right" style="height: 30px;">
                                <asp:Label ID="Label2" runat="server" Text="大图："></asp:Label></td>
                            <td width="80%" style="height: 30px" align="left">
                                <V5:ImageBox ID="imgSrcDetail" runat="server" Text="选择图片" ShowSelect="true" BoxWidth="300px" />
                            </td>
                        </tr>
                        <tr class="F7tr">
                            <td height="30" align="right">
                                <asp:Label ID="Label3" runat="server" Text="小图："></asp:Label></td>
                            <td width="80%" align="left">
                                <V5:ImageBox ID="imgSrcList" runat="server" Text="选择图片" ShowSelect="true" BoxWidth="300px" />
                            </td>
                        </tr>
                        <tr class="FFtr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl9" runat="server" HideSelects="False" FontColor="red" Header="可参与会员等级" ImageURL="images/help.gif" Text="所属被选种会员等级里面的会员才能参与此次优惠活动,不选时表示所有会员都能参加此次优惠活动。" />
                                <asp:Label ID="Label4" runat="server" Text="可参与会员等级："></asp:Label></td>
                            <td width="80%" align="left">
                                <asp:CheckBoxList ID="cblUserGroup" runat="server" RepeatColumns="5" RepeatDirection="Horizontal" CssClass="input2">
                                </asp:CheckBoxList></td>
                        </tr>
                        <tr class="F7tr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl2" runat="server" HideSelects="False" FontColor="red" Header="活动开始时间" ImageURL="images/help.gif" Text="优惠活动在这个时间开始。" />
                                <asp:Label ID="Label6" runat="server" Text="活动开始时间："></asp:Label></td>
                            <td width="80%" align="left">
                                <asp:TextBox ID="txtStartDate" runat="server" Width="200px"></asp:TextBox>
                                <img id="imgStartDate" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                                <span style="color: #ff0000">*
                                    <asp:RegularExpressionValidator ID="revStartDate" runat="server" ControlToValidate="txtStartDate" Display="Dynamic" ErrorMessage="请输入正确日期格式（如：2009-01-01）！" 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>
                                    
                                     <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtStartDate"
                                    ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                    </td>
                        </tr>
                        <tr class="FFtr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl3" runat="server" HideSelects="False" FontColor="red" Header="活动结束时间" ImageURL="images/help.gif" Text="优惠活动在这个时间结束。" />
                                <asp:Label ID="Label10" runat="server" Text="活动结束时间："></asp:Label></td>
                            <td width="80%" align="left">
                                <asp:TextBox ID="txtEndDate" runat="server" Width="200px"></asp:TextBox>
                                <img id="imgEndDate" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                                <span style="color: #ff0000">*
                                    <asp:RegularExpressionValidator ID="revEndDate" runat="server" ControlToValidate="txtEndDate" Display="Dynamic" ErrorMessage="请输入正确日期格式（如：2009-01-01）！" 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>
                                     <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEndDate"
                                    ErrorMessage="不能为空"></asp:RequiredFieldValidator>
                                    
                                    
                                    </td>
                        </tr>
                        <tr class="F7tr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="定期活动" ImageURL="images/help.gif" Text="输入定期活动的时间，中间以逗号分开，例如：2008-7-30,2008-8-1" HideSelects="True" />
                                <asp:Label ID="Label16" runat="server" Text="定期活动："></asp:Label></td>
                            <td width="80%" align="left">
                                <asp:TextBox ID="txtSpecialDate" runat="server" Width="300px" MaxLength="200"></asp:TextBox>
                                
                                                           <span style="color: #ff0000">*
                                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtSpecialDate" Display="Dynamic" ErrorMessage="输入定期活动的时间，中间以逗号分开，例如：2008-7-30,2008-8-1" ValidationExpression="([1,2]{1}\d{3}(\-|\/)\d{1,2}(\-|\/)[\d|,]{1,3})*"></asp:RegularExpressionValidator></span>
                                
                                </td>
                        </tr>
                        <tr>
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl4" runat="server" FontColor="red" Header="优惠范围" ImageURL="images/help.gif" Text="此活动关联的商品,不选的时候表示关联所有商品。" HideSelects="True" />
                                <asp:Label ID="Label9" runat="server" Text="优惠范围："></asp:Label></td>
                            <td width="80%" align="left">
                                <V5:SelectListBox ID="sblProduct" runat="server" CategoryHeaderText="商品分类:" DescHeaderText="选定商品：" SrcHeaderText="待选商品：" Width="360px" />
                            </td>
                        </tr>
                        <tr class="F7tr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl10" runat="server" FontColor="red" Header="优惠金额" ImageURL="images/help.gif" Text="优惠金额。" HideSelects="True" />
                                <asp:Label ID="Label5" runat="server" Text="优惠金额："></asp:Label></td>
                            <td width="80%" align="left">
                                <V5:NumberBox ID="txtBeginAmount" runat="server" IsInt="True" Width="60px" /> - <V5:NumberBox ID="txtEndAmount" runat="server" IsInt="True" Width="60px" />
                            </td>
                        </tr>                        
                        <tr class="F7tr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl5" runat="server" FontColor="red" Header="礼品数量" ImageURL="images/help.gif" Text="赠送礼品的数量。" HideSelects="True" />
                                <asp:Label ID="Label15" runat="server" Text="礼品数量："></asp:Label></td>
                            <td width="80%" align="left">
                                <V5:NumberBox ID="txtCount" runat="server" IsInt="True" Width="100px" />
                            </td>
                        </tr>
                        <tr>
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl6" runat="server" HideSelects="true" FontColor="red" Header="赠送礼品" ImageURL="images/help.gif" Text="此优惠活动赠送的礼品。" />
                                <asp:Label ID="Label13" runat="server" Text="赠送礼品："></asp:Label></td>
                            <td width="80%" align="left">
                                <V5:SelectListBox ID="sblGift" runat="server" CategoryHeaderText="礼品分类:" DescHeaderText="选定礼品：" SrcHeaderText="待选礼品：" Width="360px" />
                            </td>
                        </tr>
                        <tr class="FFtr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl7" runat="server" HideSelects="true" FontColor="red" Header="赠送优惠卷" ImageURL="images/help.gif" Text="此活动赠送的优惠卷。" />
                                <asp:Label ID="Label14" runat="server" Text="赠送优惠卷："></asp:Label></td>
                            <td width="80%" align="left">
                                <asp:ListBox ID="lstCoupon" runat="server" Height="150px" Width="230px" AutoPostBack="True" OnSelectedIndexChanged="lstCoupon_SelectedIndexChanged"></asp:ListBox><br />
                               <%--  2008-12-3  --%>
                                <asp:TextBox ID="TextBox1" runat="server" Style="position: relative" Width="192px"></asp:TextBox>&nbsp;<input
                                    id="Button1" onclick="javascript:document.getElementById('TextBox1').value='';" style="position: relative" type="button" value="取消优惠券" /></td>
                           
                        </tr>
                        <tr class="F7tr">
                            <td height="30" align="right">
                                <V5:HelpCtrl ID="HelpCtrl8" runat="server" FontColor="red" Header="赠送积分" ImageURL="images/help.gif" Text="此活动赠送的积分。" />
                                <asp:Label ID="Label11" runat="server" Text="赠送积分："></asp:Label></td>
                            <td width="80%" align="left">
                                <V5:NumberBox ID="txtScore" runat="server" IsInt="True" Width="100px" />
                            </td>
                        </tr>
                        <tr class="FFtr">
                            <td style="height: 250px;" align="right">
                                <asp:Label ID="Label12" runat="server" Text="优惠活动描述："></asp:Label></td>
                            <td width="80%" align="left" style="height: 250px">
                                <div style="padding: 1px 10px 1px 1px">
                                    <button id="btnSelectPicture" class="button" style="width: 72px; text-align: center; vertical-align: middle;" 
                                        runat="server" type="button">图片选择</button>
                                </div>
                                <V5:FCKeditor ID="txtContent" runat="server" Height="250px" Width="600px" MaxLength="3000"></V5:FCKeditor>
                            </td>
                        </tr>
                        <tr class="F7tr">
                            <td align="center" style="text-align: center;" colspan="2">
                                <br />
                                <asp:Button ID="btnAdd" runat="server" meta:resourcekey="btnAddResource1" OnClick="btnAddSubmit_Click" Text="确定" CssClass="button" />
                                <input id="iptReset" runat="server" type="reset" value="重置" class="button"  onclick="return confirm('确定整个页面信息置空')"/>
                                <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="IsEdit" 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     :    "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>
