<%@ page language="C#" autoeventwireup="true" inherits="Admin_SalesPromot_List, ShopNum1Deploy" %>

<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ShopNum1" %>

<%@ Register src="UserControl/MessageShow.ascx" tagname="MessageShow" tagprefix="ShopNum1" %>

<!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>Untitled Page</title>
       <link type="text/css" rel="Stylesheet" href="css/index.css" /> 
     <script type="text/javascript" language="javascript" src="../js/CommonJS.js"></script>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;">
    <form id="form1" runat="server">
     
    
         <div class="navigator">【 促销活动管理  】</div>
    
    <table style="width:100%">
        <tr>
        <td style="width:100%" align="left"><div class="query">
             <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="right">  <asp:Label ID="LabelName" runat="server" Text="活动名称：" Font-Bold="False"></asp:Label></td>
    <td><asp:TextBox ID="textBoxName" runat="server" CssClass="input1"></asp:TextBox></td>
    <td>&nbsp;</td>
    <td align="right"><asp:Label ID="lblMenu" runat="server" Text="活动类型：" Font-Bold="False"></asp:Label></td>
    <td>  <asp:DropDownList ID="DropDownListSType" runat="server" CssClass="select1">
             </asp:DropDownList></td>
  </tr>
  <tr>
    <td align="right"><asp:Label ID="LabelSSendTime" runat="server" Text="活动开始时间："></asp:Label></td>
    <td><asp:TextBox ID="TextBoxStartTime" runat="server" CssClass="input1"></asp:TextBox>
                      <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartTime" 
                            runat="server" ControlToValidate="TextBoxStartTime" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                         <ShopNum1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" 
                            EnableScriptGlobalization="True" EnableScriptLocalization="True">
                         </ShopNum1:ToolkitScriptManager>
                            <img id="imgCalendarStartTime" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                          <ShopNum1:CalendarExtender 
                                    ID="CalendarExtender1" runat="server" TargetControlID="TextBoxStartTime" 
                                    PopupButtonID="imgCalendarStartTime" CssClass="ajax__calendar">
                          </ShopNum1:CalendarExtender></td>
    <td><asp:TextBox ID="TextBoxStartTime2" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartTime2" 
                            runat="server" ControlToValidate="TextBoxStartTime2" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                            <img id="imgCalendarStartTime2" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                            <ShopNum1:CalendarExtender 
                                        ID="CalendarExtender2" runat="server" TargetControlID="TextBoxStartTime2" 
                                        PopupButtonID="imgCalendarStartTime2" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender>
                           
                  
                    
                   
    <td align="right"><asp:Label ID="lblMenu0" runat="server" Text="是否允许使用优惠券：" Font-Bold="False"></asp:Label></td>
    <td><asp:DropDownList ID="DropDownListSIsAllowFavourTicket" runat="server" CssClass="select1">
             </asp:DropDownList></td>
  </tr>
  <tr>
    <td align="right"><asp:Label ID="LabelSSendTime0" runat="server" Text="活动结束时间："></asp:Label></td>
    <td><asp:TextBox ID="TextBoxEndTime" runat="server" CssClass="input1"></asp:TextBox><asp:RegularExpressionValidator ID="RegularExpressionValidatorSSendTime0" 
                            runat="server" ControlToValidate="TextBoxEndTime" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
<img id="imgCalendarEndTime" alt="" src="../images/Calendar.png" 
                                    style="width:16px; height:18px;" />
                          <ShopNum1:CalendarExtender 
                                    ID="CalendarExtender3" runat="server" TargetControlID="TextBoxEndTime" 
                                    PopupButtonID="imgCalendarEndTime" CssClass="ajax__calendar">
                          </ShopNum1:CalendarExtender></td>
    <td><asp:TextBox ID="TextBoxEndTime2" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndTime2" 
                            runat="server" ControlToValidate="TextBoxEndTime2" Display="Dynamic" 
                            ErrorMessage="时间格式不正确" 
                            ValidationExpression="^\d{4}-(\d{2}|\d{1})-(\d{2}|\d{1})( (\d{2}|\d{1}):(\d{2}|\d{1}):(\d{2}|\d{1}))*"></asp:RegularExpressionValidator>
                            <img id="imgCalendarEndTime2" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                            <ShopNum1:CalendarExtender 
                                        ID="CalendarExtender4" runat="server" TargetControlID="TextBoxEndTime2" 
                                        PopupButtonID="imgCalendarEndTime2" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender></td>
    <td align="right"><asp:Label ID="lblMenu1" runat="server" Text="是否启用：" Font-Bold="False"></asp:Label></td>
    <td><asp:DropDownList ID="DropDownListSIsUse" runat="server" CssClass="select1">
             </asp:DropDownList></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td> <asp:Button ID="ButtonSearch" runat="server"  
                 Text="查询"  CssClass="bt2"/>
    <td>&nbsp;</td>
  </tr>
</table></div>
        </td>
        </tr>
          <tr>
        <td style="width:100%" align="left">
               
        <cc1:Num1GridView ID="Num1GridviewShow" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False"  
            Width="100%" AscendingImageUrl="~/images/SortAsc.gif" 
            DescendingImageUrl="~/images/SortDesc.gif" PageSize="5" Font-Size="Small" 
            Font-Bold="False" AddSequenceColumn="False" AllowMultiColumnSorting="False" 
                BorderColor="#CCDDEF" BorderStyle="Solid" BorderWidth="1px" CellPadding="4" 
                Del="False" DeletePromptText="确实要删除指定的记录吗？" Edit="False" FixHeader="False" 
                GridViewSortDirection="Ascending" PagingStyle="None" style="margin-left: 2px;" 
                TableName="" DataSourceID="ObjectDataSourceData">
<HeaderStyle HorizontalAlign="Center" BackColor="#6699CC" Font-Bold="True" ForeColor="#FFFFFF"></HeaderStyle>

<PagerStyle HorizontalAlign="Left" BackColor="#EEEEEE" ForeColor="#6699CC"></PagerStyle>
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        <input ID="checkboxAll" onclick="javascript:SelectAllCheckboxes(this);" 
                            type="checkbox" />
                    </HeaderTemplate>
                    <ItemTemplate>
                        <input ID="checkboxItem" type="checkbox" Value='<%# Eval("Guid") %>' />
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" Width="30px" />
                </asp:TemplateField>
                <asp:BoundField DataField="Guid" HeaderText="GUID" SortExpression="Guid" 
                    Visible="False" />
                <asp:BoundField DataField="Name" HeaderText="活动名称" SortExpression="Name" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="PromotName" HeaderText="活动类型" 
                    SortExpression="PromotName" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="活动开始时间" DataField="StartTime" 
                    SortExpression="StartTime" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField HeaderText="活动结束时间" DataField="EndTime" 
                    SortExpression="EndTime">
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="是否允许使用优惠券" SortExpression="IsAllowFavourTicket">
                  
                    <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# ChangeIsAllowFavourTicket(DataBinder.Eval(Container, "DataItem(IsAllowFavourTicket)","{0}")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="是否启用" SortExpression="IsUsed">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# ChangeIsUsed(DataBinder.Eval(Container, "DataItem(IsUsed)","{0}")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
        </cc1:Num1GridView>
        </td>
        </tr>
          <tr>
        <td style="width:100%" align="left">
        <div class="vote">
        <asp:Button ID="ButtonEdit" runat="server" onclick="ButtonEdit_Click" 
            onclientclick="return EditButton()" Text="编辑"  CssClass="bt2"/>
        <asp:Button ID="ButtonDelete" runat="server" Text="删除" 
            onclientclick="return DeleteButton()" 
            onclick="ButtonDelete_Click" CssClass="bt2"/>
             <asp:DropDownList ID="DropDownListType" runat="server">
             </asp:DropDownList>
             <asp:Button ID="ButtonAdd" runat="server" onclick="ButtonAdd_Click" 
                Text="添加选择的活动"  CssClass="bt3" />
    
        <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" />
    </div>
        </td>
        </tr>
    </table>
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" TypeName="ShopNum1.BusinessLogic.ShopNum1_SalesPromotionInfo_Action" 
       >
        <SelectParameters>
            <asp:ControlParameter ControlID="textBoxName" Name="name" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownListSType" Name="promotionType" 
                PropertyName="SelectedValue" Type="String" />
            <asp:ControlParameter ControlID="TextBoxStartTime" Name="startTime" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxEndTime" Name="endTime" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxStartTime2" Name="startTime1" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxEndTime2" Name="endTime1" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="DropDownListSIsAllowFavourTicket" 
                Name="isAllowFavourTicket" PropertyName="SelectedValue" Type="Int32" />
            <asp:ControlParameter ControlID="DropDownListSIsUse" Name="isUsed" 
                PropertyName="SelectedValue" Type="Int32" />
            <asp:Parameter DefaultValue="0" Name="isDeleted" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
   
    </form>
</body>
</html>
