<%@ page language="C#" autoeventwireup="true" inherits="Admin_EmailGroupSend_List, ShopNum1Deploy" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="ShopNum1" %>
<%@ Register assembly="ShopNum1.Control" namespace="ShopNum1.Control" tagprefix="cc1" %>
<%@ 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 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>
      <style type="text/css">
 .hidden  {
 	 display:none;
  }   
  </style>
</head>
<body style="padding:0; background-image: url(images/Bg_right.gif); background-repeat:repeat;font-size:12px">
    <form id="form1" runat="server">
    <div class="navigator">邮件发送历史</div>
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
        <td >
        <div class="query">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="20%" align="right">邮件标题：</td>
    <td><asp:TextBox ID="TextBoxTitle" runat="server" CssClass="input1"></asp:TextBox></td>
    <td align="right">发送状态：</td>
    <td><asp:DropDownList ID="DropDownListState" runat="server" CssClass="select1">
                    </asp:DropDownList></td>
  </tr>
  <tr>
    <td align="right">发送对象：</td>
    <td><asp:TextBox ID="TextBoxSendObject" runat="server" CssClass="input1"></asp:TextBox></td>
    <td align="right">是否定时发送：</td>
    <td><asp:DropDownList ID="DropDownListIsTime" runat="server" AutoPostBack="True" CssClass="select1">
                    </asp:DropDownList></td>
  </tr>
  <tr>
    <td align="right">发送时间：</td>
    <td colspan="2">                    <asp:TextBox ID="TextBoxCreateTime1" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorStartDate" 
                            runat="server" ControlToValidate="TextBoxCreateTime1" 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="TextBoxCreateTime1" 
        PopupButtonID="imgCalendarStartTime" CssClass="ajax__calendar">
                    </ShopNum1:CalendarExtender>-<asp:TextBox ID="TextBoxCreateTime2" runat="server" CssClass="input1"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndDate" 
                            runat="server" ControlToValidate="TextBoxCreateTime2" 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;" /></td>
         <ShopNum1:CalendarExtender 
        ID="CalendarExtender2" runat="server" TargetControlID="TextBoxCreateTime2" 
        PopupButtonID="imgCalendarEndTime" CssClass="ajax__calendar">
                                </ShopNum1:CalendarExtender></td>
    <td><asp:Button ID="ButtonSearch" runat="server" onclick="ButtonSearch_Click" 
                 Text="查询"  CssClass="bt2"/>
  </tr>
</table></div>
        </td>
        </tr>
          <tr>
        <td >
               
        <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="EmailTitle" HeaderText="邮件标题" 
                    SortExpression="EmailTitle" />
                <asp:BoundField DataField="SendObject" HeaderText="发送对象" 
                    SortExpression="SendObject" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="发送状态" SortExpression="State">
                      <ItemTemplate>
                        <asp:Label ID="Label1" runat="server" Text='<%# ChangeState(DataBinder.Eval(Container, "DataItem(State)","{0}")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
                <asp:BoundField DataField="SendObjectEmail" HeaderText="发送对象" 
                    SortExpression="SendObjectEmail" >
                    <HeaderStyle CssClass="hidden" />
                    <ItemStyle CssClass="hidden" HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:BoundField DataField="CreateTime" HeaderText="发送时间" 
                    SortExpression="CreateTime" >
                    <ItemStyle HorizontalAlign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="发送方式" SortExpression="IsTime">
                    <ItemTemplate>
                        <asp:Label ID="Label2" runat="server" Text='<%# ChangeisTime(DataBinder.Eval(Container, "DataItem(IsTime)","{0}")) %>'></asp:Label>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                </asp:TemplateField>
            </Columns>
        </cc1:Num1GridView>
        </td>
        </tr>
          <tr>
        <td >
    <div class="vote">
                    <asp:Button ID="ButtonSend" runat="server" Text="重新发送" 
                        onclick="ButtonSend_Click" onclientclick="return EditButton()"  
                        CssClass="bt3"/>
        <asp:Button ID="ButtonDelete" runat="server" Text="删除" 
            onclientclick="return DeleteButton()" 
            onclick="ButtonDelete_Click"  CssClass="bt2"/>
    
        <ShopNum1:MessageShow ID="MessageShow" runat="server" Visible="False" /></div>
    
        </td>
        </tr>
    </table>
    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="SearchEmailGroupSend" TypeName="ShopNum1.BusinessLogic.ShopNum1_Email_Action" 
       >
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxTitle" Name="emailtitle" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxCreateTime1" Name="strtime1" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxCreateTime2" Name="strtime2" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxSendObject" Name="sendObjectEmail" 
                PropertyName="Text" Type="String" />
<asp:ControlParameter ControlID="DropDownListState" PropertyName="SelectedValue" 
                Name="state" Type="Int32"></asp:ControlParameter>
            <asp:ControlParameter ControlID="DropDownListIsTime" Name="istime" 
                PropertyName="SelectedValue" Type="Int32" />
        </SelectParameters>
           </asp:ObjectDataSource>
    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />
    <asp:HiddenField ID="HiddenFieldXmlPath" runat="server" Value="0" />
    </form>
</body>
</html>
