<%@ Page Language="C#" MasterPageFile="~/Member/UserManage.master" AutoEventWireup="true"
    CodeFile="NewsList.aspx.cs" Inherits="Member_News_NewsList" Title="公司动态管理" %>

<%@ Register Src="../../Control/PageNo.ascx" TagName="PageNo" TagPrefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="Server">
        <script type="text/javascript">
        function SelectAll()
        {
            // 找到所有的 input 元素
            var ctllist = document.getElementsByTagName("input");
            var objcheckbox= document.getElementById("CheckBox2");     
            for( var i = 0; i< ctllist.length; i++)
            {
                if(ctllist[i].type == "checkbox" && ctllist[i].name.indexOf( "CheckBox1") >=0 )
                {   
                    if(objcheckbox.checked==true)     
                         ctllist[i].checked = true;
                    else
                         ctllist[i].checked = false;
                }
          
             }
         }
     </script>
<div id="sub_content"> 
    <div class="pagetitle">
        公司动态管理</div>
	<div class="tishi">
            <span>提&nbsp;示：</span>·您在管理公司动态的时候请慎重选择是否删除！
			</div>
    <div class="main_Supply_nav">
        <ul>
            <li class="MenuLiCheck">全部信息</li></ul>
    </div>
	<div class="clr"></div>
    <table width="795" cellpadding="0" cellspacing="0" border="0">
        <tr>
            <td height="30">
                标题名称：<asp:TextBox ID="txtTitle" runat="server"></asp:TextBox>&nbsp;公司名称：
                <asp:TextBox ID="txtCompany" runat="server"></asp:TextBox>
                <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="立即查询" CssClass="i_button" /></td>
        </tr>
    </table>
                <asp:GridView ID="grdCorpNews" runat="server" AutoGenerateColumns="False" CellPadding="0"
                    DataKeyNames="ID" GridLines="None" OnPageIndexChanging="grdCorpNews_PageIndexChanging"
                    AllowPaging="True" Width="795" CssClass="table_main1">
                    <Columns>
                        <asp:TemplateField HeaderText="选项">
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="标题">
                            <ItemTemplate>
                                <%# Eval("Title").ToString().Length <= 15 ? Eval("Title").ToString() : Eval("Title").ToString().Substring(0,15)+"..." %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="详细信息">
                            <ItemTemplate>
                                <%# Eval("Info").ToString().Length <= 15 ? Eval("Info").ToString() : Eval("Info").ToString().Substring(0,15)+"..." %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="公司名称">
                            <ItemTemplate>
                                <%# Eval("CompanyName").ToString().Length <= 15 ? Eval("CompanyName").ToString() : Eval("CompanyName").ToString().Substring(0, 15) + "..."%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="添加日期">
                            <ItemTemplate>
                                <%# GetShortDate(Eval("AddDate").ToString())%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="审核">
                            <ItemTemplate>
                                 <%# Eval("Verify").ToString()=="True"?"已审":"未审" %>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="操作">
                            <ItemTemplate>
                                <a href='NewsEdit.aspx?ID=<%# Eval("ID")%>'>编辑</a>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
					<HeaderStyle BackColor="#EEEEEE" Font-Bold="True" ForeColor="Black" BorderColor="#DDDDDD" Height="30" />
                </asp:GridView>
                <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
       <div class="paging">
                <input id="CheckBox2" name="CheckBox2" type="checkbox" onclick="SelectAll();" />
                <asp:Button ID="btnDelete" runat="server" Text="批量删除" OnClick="btnDelete_Click" CssClass="i_button" />
    <uc1:PageNo ID="PageNo1" runat="server" />
				</div>
</div>
</asp:Content>
