<%@ page language="C#" autoeventwireup="true" inherits="Admin_Announcement_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" %>

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

<!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>

   
</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>
    <div class="query">
    <table cellpadding="0" cellspacing="0" width="100%" border="0">
    <tr>
    <td align="right">公告标题：</td>
<td><asp:TextBox ID="TextBoxTitle" runat="server" CssClass="input1"></asp:TextBox></td>
    
<td align="right">发布人：</td>

<td align="left" colspan="2">
<asp:TextBox ID="TextBoxCreateUser" runat="server" CssClass="input1"></asp:TextBox></td>

</tr>
    <tr>
      <td align="right">发布时间：</td>
      <td colspan="3"><asp:TextBox ID="TextBoxStartTime" runat="server" CssClass="input1"></asp:TextBox>
            <img id="imgCalendarStartTime" alt="" src="../images/Calendar.png" 
                                    style="width: 16px; height: 18px;" />
                                    <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>
                            &nbsp;<ShopNum1:CalendarExtender 
                                      ID="CalendarExtender1" runat="server" TargetControlID="TextBoxStartTime" 
                                      PopupButtonID="imgCalendarStartTime" CssClass="ajax__calendar">
                            </ShopNum1:CalendarExtender>
    -<asp:TextBox ID="TextBoxEndTime" runat="server" CssClass="input1"></asp:TextBox>
             <asp:RegularExpressionValidator ID="RegularExpressionValidatorEndTime" 
                            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="CalendarExtender2" runat="server" TargetControlID="TextBoxEndTime" 
                         PopupButtonID="imgCalendarEndTime" CssClass="ajax__calendar">                        </ShopNum1:CalendarExtender></td>
      <td><asp:Button ID="ButtonSearch" runat="server" onclick="ButtonSearch_Click" 
                 Text="查询"  CssClass="bt2"/></td>
      
    </tr>
    </table>

    
    
    
    </div>

        
             
    
        <cc1:Num1GridView ID="Num1GridViewShow" runat="server" Width="100%" 
            AddSequenceColumn="False" AllowMultiColumnSorting="False" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" BorderColor="#CCDDEF" 
            BorderStyle="Solid" BorderWidth="1px" CellPadding="4" 
            DataSourceID="ObjectDataSourceData" Del="False" DeletePromptText="确实要删除指定的记录吗？" 
            Edit="False" FixHeader="False" GridViewSortDirection="Ascending" 
            PagingStyle="None" style="margin-left: 2px;" TableName="">
<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="Title" HeaderText="公告标题" SortExpression="Title" >
                             <ItemStyle HorizontalAlign="Left" />
                         </asp:BoundField>
                         <asp:BoundField DataField="CreateUser" HeaderText="发布人" 
                             SortExpression="CreateUser" >
                             <ItemStyle HorizontalAlign="Center" />
                         </asp:BoundField>
                         <asp:BoundField DataField="CreateTime" HeaderText="发布时间" 
                             SortExpression="CreateTime" >
                             <ItemStyle HorizontalAlign="Center" />
                         </asp:BoundField>
                     </Columns>
        </cc1:Num1GridView>
            <div class="vote">
            <asp:Button ID="ButtonAdd" runat="server" CausesValidation="False" Text="添加" 
                onclick="ButtonAdd_Click"  CssClass="bt2"/>
            <asp:Button ID="ButtonEdit" runat="server" CausesValidation="False" Text="编辑" 
                onclientclick="return EditButton()" onclick="ButtonEdit_Click" CssClass="bt2"/>
            <asp:Button ID="ButtonDelete" runat="server" CausesValidation="False" 
                Text="删除" onclientclick="return DeleteButton()" 
                onclick="ButtonDelete_Click" CssClass="bt2"/>
    
        <uc1:MessageShow ID="MessageShow" runat="server" Visible="False" />
        </div>

    <asp:ObjectDataSource ID="ObjectDataSourceData" runat="server" 
        SelectMethod="Search" 
        TypeName="ShopNum1.BusinessLogic.ShopNum1_Announcement_Action" 
        OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:ControlParameter ControlID="TextBoxTitle" Name="title" PropertyName="Text" 
                Type="String" />
            <asp:ControlParameter ControlID="TextBoxCreateUser" Name="creater" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxStartTime" Name="startDate" 
                PropertyName="Text" Type="String" />
            <asp:ControlParameter ControlID="TextBoxEndTime" Name="endDate" 
                PropertyName="Text" Type="String" />
            <asp:Parameter DefaultValue="0" Name="isDeleted" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>

    <asp:HiddenField ID="CheckGuid" runat="server" Value="0" />

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