<%
    //-----------------------------------------------------------
    // 文件名称: Promotions_IndianaJones_Operate.aspx
    // 页面名称: 夺宝奇兵添加/编辑
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-06-13
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Promotions_IndianaJones_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>

    <style type="text/css">
    .titles{
        color:#666666;
        font-size: 12px; 
        font-family:Arial, Helvetica, sans-serif;
        width: 20%;
        height:30px;
        text-align: right
    }
    .items{
        color:#666666;
        font-size: 12px; 
        font-family:Arial, Helvetica, sans-serif;
        width: 80%;
        text-align: left
    }
    </style>
</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="【夺宝奇兵编辑】" />
                <a href='Promotions_IndianaJones_Manage.aspx' title="返回列表"><asp:Label ID="lblReturn" runat="server" Text="返回列表" /></a>
            </div>
        </div>
        <div style="text-align: center;">
            <asp:Panel runat="server" ID="PanelShow" Width="100%">
                <div>
                    <table id="OperateTable" width="100%" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td class="titles">
                                <asp:Label ID="Label1" runat="server" Text="活动名称："/>
                            </td>
                            <td class="items">
                                <asp:TextBox ID="txtName" runat="server" Width="300px" MaxLength="50" />
                                <span style="color:Red;">*</span>
                                <asp:RequiredFieldValidator ID="revName" runat="server" ControlToValidate="txtName" Display="Dynamic" ErrorMessage ="必须输入！" />
                            </td>
                        </tr>
                        <tr>
                            <td class="titles">
                                <asp:Label ID="Label2" runat="server" Text="大图："></asp:Label></td>
                            <td class="items">
                                <V5:ImageBox ID="imgSrcDetail" runat="server" Text="选择图片" ShowSelect="true" BoxWidth="300px" />
                            </td>
                        </tr>
                        <tr>
                            <td class="titles">
                                <asp:Label ID="Label3" runat="server" Text="小图："></asp:Label></td>
                            <td class="items">
                                <V5:ImageBox ID="imgSrcList" runat="server" Text="选择图片" ShowSelect="true" BoxWidth="300px" />
                            </td>
                        </tr>
                        <tr>
                            <td class="titles" style="height: 30px"><V5:HelpCtrl ID="HelpCtrl5" runat="server" FontColor="red" Header="活动的商品" HideSelects="False" ImageURL="images/help.gif" Text="先搜索商品，搜索出来的商品会显示在列表中，然后再选择。" />
                                <asp:Label ID="Label4" runat="server" Text="活动商品：" />
                            </td>
                            <td class="items" style="height: 30px">
                                <asp:DropDownList ID="ddlProduct" runat="server" Width="150px">
                                    <asp:ListItem Value="-1">请选择</asp:ListItem>
                                </asp:DropDownList>
                                <asp:TextBox ID="txtProductName" runat="server" />
                                <asp:Button ID="btnProduct" runat="server" CssClass="button" Text="查询" OnClick="btnProduct_Click" CausesValidation="False" />
                            </td>
                        </tr>
                        <tr>
                            <td class="titles">
                                <asp:Label ID="Label6" runat="server" Text="活动开始时间："></asp:Label></td>
                            <td class="items">
                                <asp:TextBox ID="txtStartDate" runat="server" Width="200px" />
                                <img id="imgStartDate" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                                <span style="color: #ff0000">*</span>
                                <asp:RegularExpressionValidator ID="revStartDate" runat="server" ControlToValidate="txtStartDate"
                                    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></td>
                        </tr>
                        <tr>
                            <td class="titles">
                                <asp:Label ID="Label10" runat="server" Text="活动结束时间：" />
                            </td>
                            <td class="items">
                                <asp:TextBox ID="txtEndDate" runat="server" Width="200px" />
                                <img id="imgEndDate" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                                <span style="color: #ff0000">*</span>
                                <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$)*" />
                            </td>
                        </tr>
                        <tr>
                            <td class="titles"><V5:HelpCtrl ID="HelpCtrl3" runat="server" FontColor="red" Header="价格下限" HideSelects="False" ImageURL="images/help.gif" Text="出价者至少需出的价格。价格的下限" />
                                <asp:Label ID="Label8" runat="server" Text="价格下限："></asp:Label></td>
                            <td class="items">
                                <V5:NumberBox ID="txtMinPrice" runat="server" Width="100px" IsInt="false" />
                            </td>
                        </tr>
                        <tr>
                            <td class="titles"><V5:HelpCtrl ID="HelpCtrl4" runat="server" FontColor="red" Header="价格上限" HideSelects="False" ImageURL="images/help.gif" Text="出价者最多能出的价格,价格的上限出价者至少需出的价格。" />
                                <asp:Label ID="Label7" runat="server" Text="价格上限："></asp:Label></td>
                            <td class="items">
                                <V5:NumberBox ID="txtMaxPrice" runat="server" Width="100px" IsInt="false" />
                            </td>
                        </tr>
                        <tr>
                            <td class="titles">
                                <V5:HelpCtrl ID="HelpCtrl1" runat="server" FontColor="red" Header="最多需要支付的价格" HideSelects="False" ImageURL="images/help.gif" Text="获奖者出价高于这个价格，则以这个价格购买该商品。为0时按用户出价购买商品" />
                                <asp:Label ID="Label9" runat="server" Text="最多需要支付的价格："></asp:Label></td>
                            <td class="items">
                                <V5:NumberBox ID="txtFinalMaxPrice" runat="server" Width="100px" IsInt="false" />
                                </td>
                        </tr>
                        <tr>
                            <td class="titles">
                                <V5:HelpCtrl ID="HelpCtrl2" runat="server" FontColor="red" Header="消耗积分" HideSelects="False" ImageURL="images/help.gif" Text="每次出价所消耗的积分值,如果税分不够.无法购买，默认为0，0表示不消耗积分" />
                                <asp:Label ID="Label11" runat="server" Text="消耗积分："></asp:Label></td>
                            <td class="items">
                                <V5:NumberBox ID="txtScore" runat="server" Width="100px" IsInt="true" />
                                </td>
                        </tr>
                        <tr>
                            <td class="titles">
                                <asp:Label ID="Label12" runat="server" Text="活动描述："></asp:Label></td>
                            <td class="items">
                                <asp:TextBox runat="server" ID="txtDescription" TextMode="MultiLine" Height="150px" Width="400px" />
                                <asp:RegularExpressionValidator ID="revDescription" runat="server" ControlToValidate="txtDescription" ErrorMessage="长度必须在250以内" ValidationExpression=".{0,250}" Display="Dynamic" />
                            </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="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
});
//加TABLE样式
InitTrClass();
        </script>

    </form>
</body>
</html>
