<%@ Page Language="C#" MasterPageFile="~/member/UserManage.master" AutoEventWireup="true"
    CodeFile="FavoriteList.aspx.cs" Inherits="member_Trade_FavoriteList" Title="我的收藏" %>

<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>·请慎重选择是否删除
			</div>
            <div class="main_Supply_nav">
                <ul id="menu">
                    <li id="menu1" runat="server"><a href="FavoriteList.aspx?content_type=Supply">
                        供应信息</a> </li>
                    <li id="menu2" runat="server"><a href="FavoriteList.aspx?content_type=Purchase">
                        求购信息</a></li>
                    <li id="menu3" runat="server"><a href="FavoriteList.aspx?content_type=Company">
                        公司信息</a></li></ul>
            </div>
            <asp:Panel ID="pnlSupply" runat="server">
			<asp:DataList ID="dlstSupply" runat="server" RepeatColumns="1" SeparatorStyle-BorderWidth="0" DataKeyField="ID" CssClass="fl">
                          <itemtemplate>
                           <table width="795" cellpadding="0" cellspacing="0" border="0" class="table_main1">
                              <tr>
                               <td width="50" align="center"><asp:CheckBox ID="CheckBox1" runat="server" /></td>
                               <td width="120" align="center"><asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"Picture_1")%>' Width="80px" Height="80px" /></td>
                                <td width="250" align="center"><a href="<%=WebUrl %>Supply/Detail.aspx?ID=<%# Eval("ProductID") %>" target="_blank"> <%# DataBinder.Eval(Container.DataItem,"Name")%> </a> <br />
                                  <a href="<%=WebUrl %>Shops/Index/<%# Eval("LoginName") %>.shtml" target="_blank"> <%# DataBinder.Eval(Container.DataItem,"CompanyName")%> </a> </td>
                                <td align="center" width="243"><%# DataBinder.Eval(Container.DataItem,"Place")%> </td>
                                <td align="center"><%# DataBinder.Eval(Container.DataItem,"QQ")%> </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>在线QQ</strong></td>
								 </tr>
								</table>
                          </headertemplate>
                        </asp:DataList>
            </asp:Panel>
            <asp:Panel ID="pnlPurchase" runat="server">
                            <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>
                                            <td width="50" align="center">
                                                <asp:CheckBox ID="CheckBox1" runat="server" />
                                            </td>
                                            <td width="120" align="center">
                                                <asp:Image ID="Image1" runat="server" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"Picture_1")%>'
                                                    Width="80px" Height="80px" /></td>
                                            <td width="250" align="center">
                                                <a href="<%=WebUrl %>Purchase/Detail.aspx?ID=<%# Eval("ProductID") %>" target="_blank">
                                                    <%# DataBinder.Eval(Container.DataItem,"Name")%>
                                                    <br />
                                                </a><span style="color: Gray">
                                                    <%# DataBinder.Eval(Container.DataItem,"AddDate")%>
                                                </span>
                                            </td>
                                            <td align="center" width="243"><%# DataBinder.Eval(Container.DataItem, "Province").ToString() == DataBinder.Eval(Container.DataItem, "City").ToString() ? DataBinder.Eval(Container.DataItem, "Province") :DataBinder.Eval(Container.DataItem, "Province").ToString()+DataBinder.Eval(Container.DataItem, "City").ToString()%></td>
                                          <td align="center"><%# DataBinder.Eval(Container.DataItem,"QQ")%></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>在线QQ</strong></td>
								 </tr>
								</table>
                                </HeaderTemplate>
                            </asp:DataList>
            </asp:Panel>
            <asp:Panel ID="pnlCompany" runat="server">
                            <asp:DataList ID="dlstCompany" runat="server" RepeatColumns="1" DataKeyField="ID" CssClass="fl">
                                <ItemTemplate>
                                    <table width="100%">
                                        <tr>
                                            <td style="width: 40px">
                                                <asp:CheckBox ID="CheckBox1" runat="server" />
                                            </td>
                                            <td style="width: 300px">
                                                <a href="">
                                                    <%# DataBinder.Eval(Container.DataItem, "CompanyName")%>
                                                </a>
                                                <br />
                                                <%# Base.Common.ClearHtml(Eval("Summary").ToString()).Trim().Length <= 30 ? Base.Common.ClearHtml(Eval("Summary").ToString()).Trim() : Base.Common.ClearHtml(Eval("Summary").ToString()).Trim().Substring(0, 30) + "..."%>
                                                <br />
                                                主营：<%# DataBinder.Eval(Container.DataItem, "Product")%>
                                                <br />
                                                <a href="" target="_blank">查看该公司所有信息</a>
                                            </td>
                                            <td style="width: 100px">
                                                <%# DataBinder.Eval(Container.DataItem, "Province").ToString() == DataBinder.Eval(Container.DataItem, "City").ToString() ? DataBinder.Eval(Container.DataItem, "Province") : DataBinder.Eval(Container.DataItem, "Province").ToString()+DataBinder.Eval(Container.DataItem, "City").ToString() %>
                                            </td>
                                            <td align="left" style="width: 100px">
                                                <%# DataBinder.Eval(Container.DataItem,"QQ")%>
                                            </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>在线QQ</strong></td>
								 </tr>
								</table>
                                </HeaderTemplate>
                            </asp:DataList>
            </asp:Panel>
          <div class="paging">
		   <p><asp:Label ID="lblPagination" runat="server" Text="Label"></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>
