<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_Announce, HoWaveVGO" title="网站公告管理" enableEventValidation="false" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"></asp:ScriptManager>
 <table class="adminheading">
   <tr>
      <th valign="middle" class="menus" align="left" width="70%"> 公告管理</th>
      <td align="right">
      <div style="width:100px"><a href="Admin_AddAnnounce.aspx">发布公告</a></div>  </td>  
      <td class="rtdw"></td>          
   </tr>                     
</table>

      <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Always" >
         <ContentTemplate>
<asp:GridView id="GridView1" runat="server" CssClass="adminlist" OnDataBound="GridView1_DataBound" OnRowDataBound="GridView1_RowDataBound" DataSourceID="ObjectDataSource1" Width="100%" RowStyle-HorizontalAlign="Center" DataKeyNames="AnnounceID" AutoGenerateColumns="False" AllowPaging="True" __designer:wfdid="w2"><Columns>
<asp:BoundField ReadOnly="True" DataField="AnnounceID" InsertVisible="False" SortExpression="AnnounceID" HeaderText="公告编号"></asp:BoundField>
<asp:BoundField DataField="AnnounceTitle" SortExpression="AnnounceTitle" HeaderText="公告标题"></asp:BoundField>
<asp:BoundField DataField="AnnounceType" SortExpression="AnnounceType" HeaderText="公告类型"></asp:BoundField>
<asp:BoundField DataField="AnnounceImportant" SortExpression="AnnounceImportant" HeaderText="公告等级"></asp:BoundField>
<asp:BoundField DataField="AnnounceOwner" SortExpression="AnnounceOwner" HeaderText="发布人"></asp:BoundField>
<asp:BoundField HtmlEncode="False" DataFormatString="{0:d}" DataField="AnnounceBegin" SortExpression="AnnounceBegin" HeaderText="公告发布日期"></asp:BoundField>
<asp:BoundField HtmlEncode="False" DataFormatString="{0:d}" DataField="AnnounceEnd" SortExpression="AnnounceEnd" HeaderText="公告结束日期"></asp:BoundField>
<asp:TemplateField HeaderText="内容">
<EditItemTemplate>
 <asp:TextBox runat="server" Text='<%# Bind("AnnounceContent") %>' id="TextBox1"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
 <asp:Label runat="server" Text='<%# Bind("AnnounceContent") %>' id="Label1"></asp:Label>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="AnnounceReadCount" HeaderText="浏览量"></asp:BoundField>
<asp:HyperLinkField HeaderText="修改" Text="修改" DataNavigateUrlFormatString="Admin_AddAnnounce.aspx?AnnounceID={0}" DataNavigateUrlFields="AnnounceID"></asp:HyperLinkField>
<asp:TemplateField HeaderText="删除">
<ItemTemplate>
<asp:LinkButton ID="cl" runat="server" CommandName="Delete" OnClientClick="{if(confirm('确定删除吗？')) return true;return false;}" Text="删除"/>
</ItemTemplate>
</asp:TemplateField>
</Columns>
<EmptyDataTemplate>
<tr>
  <th scope="col">公告编号</th><th scope="col">公告标题</th><th scope="col">公告类型</th><th scope="col">公告等级</th><th scope="col">发布人</th><th scope="col">公告发布日期</th><th scope="col">公告结束日期</th><th scope="col">内容</th><th scope="col">浏览量</th><th scope="col">修改</th><th scope="col">删除</th>
</tr>
<tr>
  <td colspan="11">暂无公告！</td>
</tr>
</EmptyDataTemplate>
<RowStyle HorizontalAlign="Center"></RowStyle>
</asp:GridView> 
</ContentTemplate>
       
      </asp:UpdatePanel>
      <div id="AnnouncePanel">
          &nbsp;</div> 
       <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="DeleteAnnounce" SelectMethod="GetAnnounces" TypeName="AnnounceBLL" OldValuesParameterFormatString="{0}" >
              <DeleteParameters>
                  <asp:Parameter Name="AnnounceID" Type="Int32" />
              </DeleteParameters>
          </asp:ObjectDataSource>
     
  
 <script type="text/javascript">  
 </script>
</asp:Content>

