<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="ETongJin.YM.Web.Home.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>信息列表 - Powered by E桶金</title>
    <link rel="stylesheet" href="images/user.css" type="text/css" media="screen,projection" />

    <script type="text/javascript" src="../Utility/jquery.js"></script>

    <%if (false)
      {%>

    <script type="text/javascript" src="../Utility/jquery-dev.js"></script>

    <%}%>

    <script type="text/javascript" src="images/home.js"></script>

    <script type="text/javascript">
        function CheckAll(obj) {
            var allcheck = document.getElementsByName("productid");
            for (i = 0; i < allcheck.length; i++) {
                allcheck[i].checked = obj.checked;
            }
        }
        parent.menuSelect("list" + queryString("t"));
    </script>

    <meta http-equiv="x-ua-compatible" content="ie=7" />
</head>
<body>
    <div class="wrap">
        <form id="form1" runat="server">
        <div class="panel ym_h_rt ym_line">
            <ul class="ym_head">
                <li class="title">
                    <%if (Request.QueryString["t"] == "0") Response.Write("卖家"); else Response.Write("买家"); %>
                    信息列表</li>
            </ul>
            <table class="tableBorder" border="0" cellpadding="0" cellspacing="1">
                <tr>
                    <th colspan="8">
                        <table width="100%" border="0">
                            <tr>
                                <td>
                                    <table border="0" cellspacing="0" cellpadding="0">
                                        <tr>
                                            <td width="80" style="color: #990000;">
                                                筛选：
                                            </td>
                                            <td width="100">
                                                <asp:DropDownList AutoPostBack="true" ID="ddlCategory" runat="server" DataSourceID="ObjectDataSource1"
                                                    onchange="if(this.value=='0') return false;" DataTextField="CategoryName" DataValueField="CategoryID"
                                                    OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </td>
                                            <td width="90">
                                                <asp:DropDownList ID="ddlStatus" runat="server" AutoPostBack="true" onchange="if(this.value=='-2') return false;"
                                                    OnSelectedIndexChanged="ddlStatus_SelectedIndexChanged">
                                                    <asp:ListItem Text="按属性" Value="-2" Selected="True"></asp:ListItem>
                                                    <asp:ListItem Text="待审" Value="-1"></asp:ListItem>
                                                    <asp:ListItem Text="已审" Value="0"></asp:ListItem>
                                                    <asp:ListItem Text="文字推荐" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="图片推荐" Value="2"></asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                            <td width="90">
                                                <asp:DropDownList ID="ddlOrder" runat="server" AutoPostBack="true" onchange="if(this.value=='-1') return false;"
                                                    OnSelectedIndexChanged="ddlOrder_SelectedIndexChanged">
                                                    <asp:ListItem Text="排序方式" Value="-1" Selected="True"></asp:ListItem>
                                                    <asp:ListItem Text="按 ID" Value="0"></asp:ListItem>
                                                    <asp:ListItem Text="发布时间" Value="1"></asp:ListItem>
                                                    <asp:ListItem Text="更新时间" Value="2"></asp:ListItem>
                                                    <asp:ListItem Text="浏览人数" Value="3"></asp:ListItem>
                                                    <asp:ListItem Text="购买意向" Value="4"></asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <table border="0" align="right" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td width="150" style="color: #990000; text-align: right;">
                                                搜索：
                                            </td>
                                            <td width="80">
                                                <asp:DropDownList ID="ddlSearchKey" runat="server" DataSourceID="ObjectDataSource1"
                                                    DataTextField="CategoryName" DataValueField="CategoryID">
                                                </asp:DropDownList>
                                            </td>
                                            <td width="90px">
                                                <asp:TextBox ID="txtKeyWords" runat="server" Text="关键字" Style="width: 150px; text-align: left"
                                                    onfocus="if(this.value=='关键字')this.value='';"></asp:TextBox>
                                            </td>
                                            <td width="60px">
                                                <asp:Button ID="Button4" runat="server" Text=" 提交 " OnClick="Button4_Click" />
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </th>
                </tr>
                <tr>
                    <td width="30">
                        <b>选中</b>
                    </td>
                    <td>
                        <b>商品名称</b>
                    </td>
                    <td width="60">
                        <b>演示地址</b>
                    </td>
                    <td width="30">
                        <b>订单</b>
                    </td>
                    <td width="30">
                        <b>查看</b>
                    </td>
                    <td width="70">
                        <b>价格</b>
                    </td>
                    <td width="40">
                        <b>状态</b>
                    </td>
                    <td width="100px">
                        <b>信息常规操作</b>
                    </td>
                </tr>
                <asp:Repeater ID="Repeater1" runat="server">
                    <ItemTemplate>
                        <tr bgcolor="#FFFFFF" onmouseover="javascript:this.bgColor='#E3E1D7'" onmouseout="javascript:this.bgColor='#FFFFFF'"
                            style="text-align: center; height: 27">
                            <td>
                                <input name='productid' type='checkbox' value='<%#Eval("ProductID") %>' style="border: none" />
                            </td>
                            <td style="text-align: left;">
                                <a href="<%# Eval("Status").ToString()=="-1"?("/show.aspx?i="+Eval("ProductID")):Eval("PathURL") %>"
                                    target="_blank">
                                    <%# ETongJin.Common.StringOperate.CutString(Eval("Title").ToString(),26) %></a>
                            </td>
                            <td>
                                <a href="<%#Eval("DemoURL") %>" target="_blank">演示地址</a>
                            </td>
                            <td>
                                <%#Eval("PurchaseIntentNum")%>
                            </td>
                            <td>
                                <%#Eval("Hits") %>
                            </td>
                            <td>
                                <%#Eval("Price") %>元
                            </td>
                            <td>
                                <%#Eval("Status").ToString()=="-1"?"未审":"已审"%>
                            </td>
                            <td>
                                <asp:LinkButton ID="btnUp" runat="server" OnClick="btnUp_Click" ToolTip="顶一下可以让您发布的信息显示在最前面！"
                                    CommandArgument='<%# Eval("ProductID")%>'>顶一下</asp:LinkButton>
                                | <a href="Edit.aspx?i=<%# Eval("ProductID") %>">修改</a> |
                                <asp:LinkButton ID="btnDel" runat="server" OnClick="btnDel_Click" CommandArgument='<%# Eval("ProductID")%>'
                                    OnClientClick="return confirm('删除后无法恢复，您是否确定删除？');">删除</asp:LinkButton>
                            </td>
                        </tr>
                    </ItemTemplate>
                </asp:Repeater>
                <tr>
                    <td colspan="8" class="td2" style="text-align: left; height: 30px;">
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr>
                                <td width="180">
                                    <input name='chkAll' type='checkbox' id='chkAll' onclick='CheckAll(this)' value='checkbox'
                                        style="border: none" />选中本页显示的所有商品
                                </td>
                                <td>
                                    <asp:Button ID="Button7" runat="server" Text="批量删除" OnClick="ButtonClick" CommandArgument="4"
                                        OnClientClick="return confirm('删除后无法恢复，您是否确定删除？');" />&nbsp;
                                </td>
                                <td>
                                    &nbsp;
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <th colspan="8" style="text-align: center;">
                        <div id="tnt_pagination">
                            <%= PageStr%></div>
                        <div class="ym12_mian_y">
                        </div>
                    </th>
                </tr>
            </table>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetAllList"
                TypeName="ETongJin.YM.BLL.ProductCategory"></asp:ObjectDataSource>
        </div>
        </form>
    </div>
</body>
</html>
