<%@ Page Language="C#" EnableEventValidation="false" MasterPageFile="~/Member/UserManage.master"
    AutoEventWireup="true" CodeFile="ExpoList.aspx.cs" Inherits="Member_Expo_ExpoList" %>

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

    <form id="form1" action="">
        <div id="sub_content">
            <div class="pagetitle">
                展会管理</div>
            <div class="tishi">
                <span>提&nbsp;示：</span>·请慎重修改！
            </div>
            <div class="main_Supply_nav">
                <ul id="menu">
                    <li id="menu1" runat="server"><a href="ExpoList.aspx?Verify=1">已发布上网</a></li><li
                        id="menu2" runat="server" class="MenuLi"><a href="ExpoList.aspx?Verify=3">审核中</a></li><li
                            id="menu3" runat="server" class="MenuLi"><a href="ExpoList.aspx?Verify=2">审核未通过</a></li><li
                                id="menu4" runat="server" class="MenuLi"><a href="ExpoList.aspx?Verify=4">过期信息</a></li></ul>
            </div>
            <div class="clr">
            </div>
            <table width="795" border="0" cellpadding="0" cellspacing="0">
                <tbody>
                    <tr>
                        <td colspan="2" height="30">
                            关键字：<asp:TextBox ID="txtKeyword" runat="server"></asp:TextBox>
                            所属类别:<asp:DropDownList ID="dropExpoType" runat="server">
                            </asp:DropDownList>
                            <asp:Button ID="btnSelect" OnClick="btnSelect_Click" runat="server" Text="查询"></asp:Button></td>
                    </tr>
                </tbody>
            </table>
            <asp:GridView ID="grdExpo" runat="server" AutoGenerateColumns="False" CellPadding="0"
                Font-Overline="False" 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") %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="所属类别">
                        <ItemTemplate>
                            <a style="text-decoration: none" href='ExpoList.aspx?TypeID=<%# DataBinder.Eval(Container.DataItem,"TypeID") %>'>
                                <%# DataBinder.Eval(Container.DataItem, "Type") %>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText=" 开始日期">
                        <ItemTemplate>
                            <%# GetShortDate(DataBinder.Eval(Container.DataItem, "StartDate").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="结束日期">
                        <ItemTemplate>
                            <%# GetShortDate(DataBinder.Eval(Container.DataItem, "EndDate").ToString())%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>
                            修改
                        </HeaderTemplate>
                        <ItemTemplate>
                            <a href='ExpoEdit.aspx?id=<%# DataBinder.Eval(Container.DataItem,"ID") %>'>修改</a>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle BackColor="#F1F1F1" Font-Bold="True" ForeColor="Black" BorderColor="#DDDDDD"
                    Height="30px" />
            </asp:GridView>
            <div class="paging">
                <p>
                    <asp:Label ID="Pagin" runat="server"></asp:Label></p>
                <input id="CheckBox2" name="CheckBox2" onclick="SelectAll();" type="checkbox" />
                <asp:Button ID="btnDelete" runat="server" Font-Size="9pt" OnClick="btnDelete_Click"
                    Text="批量删除" />
            </div>
        </div>
    </form>
</asp:Content>
