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

<asp:Content ID="Content1" ContentPlaceHolderID="ContInfo" runat="server">
    <script type="text/ecmascript">
        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">
	 <div id="sub_content"> 
            <div class="pagetitle">
                管理求购信息</div>
			<div class="tishi">
            <span>提&nbsp;示：</span>
			<p>·修改信息：审核通过才能上网，可以增加商机有效期及提升信息排名。</p>
			<p>·过期信息：建议您重发有用的过期信息，信息过期6个月后将被系统自动删除！批量重发过期信息</p>
			<div class="clr"></div>
			</div>
            <div class="main_Supply_nav" >
                <ul id="menu">
                    <li id="menu1" runat="server"><a href="PurchaseManage.aspx?Verify=1&class=MenuLiCheck">
                        已发布上网</a></li><li id="menu2" runat="server"><a href="PurchaseManage.aspx?Verify=3&class=MenuLiCheck">
                            审核中</a></li><li id="menu3" runat="server"><a href="PurchaseManage.aspx?Verify=2&class=MenuLiCheck">
                                审核未通过</a></li><li id="menu4" runat="server"><a href="PurchaseManage.aspx?Verify=4&class=MenuLiCheck">
                                    过期信息</a></li></ul>
            </div>
                        <asp:DataList ID="dlstPurchase" runat="server" RepeatColumns="1" DataKeyField="ID" CssClass="fl">
                            <ItemTemplate>
                              <table width="795" cellpadding="0" cellspacing="0" border="0" class="table_main1">
                          <tr  onmouseover="this.style.backgroundColor='#F6F6F6'" onmouseout="this.style.backgroundColor=''">
                            <td width="50" align="center"><asp:CheckBox ID="CheckBox1" runat="server" /></td>
                            <td width="120" align="center"><asp:Image ID="Image1" runat="server" ImageUrl='<%# GetImageUrl(Eval("Picture_1").ToString()) %>' width="80px" Height="80px" /></td>
                            <td width="250" align="center"> 【求购】<%# DataBinder.Eval(Container.DataItem,"Name")%> </td>
                            <td align="center" width="243"><%# GetShortDate(DataBinder.Eval(Container.DataItem,"EndDate").ToString())%> </td>
                            <td align="center"><a href='PurchaseEdit.aspx?ID=<%# DataBinder.Eval(Container.DataItem,"ID")%>'>修改 </a>                            </td>
                          </tr>
                        </table>
                            </ItemTemplate>
                            <HeaderTemplate>
                            <table width="795" height="30" cellpadding="0" cellspacing="0" class="table_main1">
                          <tr>
                            <td align="center" width="50" bgcolor="#EEEEEE"> <strong>选项</strong></td>
                            <td align="center" width="120" bgcolor="#EEEEEE"> <strong>图片</strong></td>
                            <td align="center" width="250" bgcolor="#EEEEEE"> <strong>信息类型</strong></td>
                            <td align="center" width="243" bgcolor="#EEEEEE"> <strong>到期时间</strong></td>
                            <td align="center" bgcolor="#EEEEEE"> <strong>操作</strong></td>
                          </tr>
                        </table>
                            </HeaderTemplate>
                        </asp:DataList>
                        <asp:Label ID="lblMessage" runat="server" Text="Label" Visible="False"></asp:Label>
				<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>
