<%@ page language="C#" autoeventwireup="true" inherits="ECMe_Product_ProductList, ECMe_Deploy" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!-- Put IE into quirks mode -->
<!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 runat="server">
    <title>商品列表</title>
    <link href="../CSS/Admin/CSS/ECMe.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Admin/CSS/body156.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Admin/CSS/volti.css" rel="stylesheet" type="text/css" />
    <link href="../CSS/Admin/TableSort/tablesort.css" rel="stylesheet" type="text/css" />
    <link href="../JS/ThickBox/thickbox.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="../JS/jquery.js"></script>
    <script type="text/javascript" src="../JS/Common.js"></script>
    <script type="text/javascript" src="../JS/ThickBox/thickbox.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="header">
        <div class="header_top">
            <h2>
                商品管理 &gt; <span class="blue">商品列表</span>
            </h2>
        </div>
        <div class="top_body">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                    <th style="width: 390px;">
                        常用操作：
                    </th>
                    <th>
                        商品搜索：&nbsp;<span style="color: #999999">(商品名称，货号，分类，定位符)</span>
                    </th>
                </tr>
                <tr>
                    <td>
                        <asp:Button ID="BDeleteItem" runat="server" Text="删除" OnClientClick="return confirm('你真的要删除?');"
                            OnClick="BDeleteItem_Click" CssClass="but_1"/>
                        <asp:Button ID="BReverse" runat="server" Text="反转排序" OnClick="BReverse_Click"  CssClass="but_2"/>
                        <asp:Button ID="BSort" runat="server" Text="更新排序" OnClick="BSort_Click" CssClass="but_2"/>
                        <asp:Button ID="BIsSellNo" runat="server" Text="下架" OnClick="BIsSellNo_Click" CssClass="but_1"/>
                        <asp:Button ID="BIsSellYes" runat="server" Text="上架" OnClick="BIsSellYes_Click" CssClass="but_1"/>
                        <asp:Button ID="BPrint" runat="server" Text="打印" OnClick="BPrint_Click" CssClass="but_1"/>
                    </td>
                    <td>
                        <asp:TextBox ID="TProductName" Width="80px" runat="server"></asp:TextBox>
                        <asp:TextBox ID="TProductNumber" Width="80px" runat="server"></asp:TextBox>
                        <asp:DropDownList ID="DCategoryID" runat="server" Width="80px">
                        </asp:DropDownList>
                        <asp:DropDownList ID="DProductlocation" runat="server" Width="40px">
                            <asp:ListItem Value="" Text="全部"></asp:ListItem>
                        </asp:DropDownList>
                        <asp:Button ID="BSearch" runat="server" Text="搜索商品" OnClick="BSearch_Click" CssClass="but_2"/>
                        <asp:HiddenField ID="HOrderBy" runat="server" />
                        <asp:HiddenField ID="HSort" Value="true" runat="server" />
                        <asp:HiddenField ID="HIsSell" Value="true" runat="server" />
                    </td>
                </tr>
            </table>
        </div>
        <div class="tab_top">
            <table class="thead">
                <tbody>
                    <tr>
                        <th style="width: 30px">
                            <input id="ChkAll" type="checkbox" onclick="Check(this,'CheckBoxSelect','RepeaterTable')" />
                        </th>
                        <th style="width: 45px">
                            <asp:LinkButton ID="LOrderSort" CssClass="blue" runat="server" OnClick="LOrderSort_Click">排序↓</asp:LinkButton>
                        </th>
                        <th style="width: 55px">
                            图片
                        </th>
                        <th style="width: 355px">
                            名称
                        </th>
                        <th style="width: 55px">
                            <asp:LinkButton ID="LOrderPrice" CssClass="blue" runat="server" OnClick="LOrderPrice_Click">商品售价</asp:LinkButton>
                        </th>
                        <th style="width: 30px">
                            <asp:LinkButton ID="LOrderStock" CssClass="blue" runat="server" OnClick="LOrderStock_Click">库存</asp:LinkButton>
                        </th>
                        <th style="width: 120px">
                            商品分类与货号
                        </th>
                        <th>
                           编辑
                        </th>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="container">
        <div class="tab_body">
            <table class="tbody">
                <tbody>
                    <asp:Repeater ID="RepeaterTable" runat="server" OnItemCommand="RepeaterTable_ItemCommand">
                        <ItemTemplate>
                            <tr>
                                <td style="width: 30px">
                                    <asp:CheckBox ID="CheckBoxSelect" runat="server" ToolTip='<%#Eval("ID")%>' BorderStyle="None"
                                        BorderWidth="0px" />
                                </td>
                                <td style="width: 45px">
                                    <asp:TextBox ID="TProductOrder" Width="40px" CssClass="top_input" ToolTip='<%#Eval("ID")%>'
                                        Text='<%#Eval("ProductOrder")%>' runat="server"></asp:TextBox>
                                </td>
                                <td style="width: 55px">
                                    <asp:Image ID="IProductImg" ImageUrl='<%# Common.GetProductSmallImg(int.Parse(Eval("ID").ToString())) %>'
                                        Width="54" Height="54" runat="server" CssClass="img_ys" ToolTip="商品图片" />
                                </td>
                                <td style="width: 355px">
                                    <p>
                                        <img src="../CSS/Admin/images/Goods.png" alt="商品名称" />
                                        <a href="../../Product.aspx?id=<%#Eval("ID")%>" target="_blank" class="blue">
                                            <%#Eval("ProductName")%></a>
                                    </p>
                                    <p>
                                        <asp:LinkButton ID="BItem0" CommandName="Item0" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item0") %>' runat="server"><%#ProductLocationName.Item0()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem1" CommandName="Item1" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item1") %>' runat="server"><%#ProductLocationName.Item1()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem2" CommandName="Item2" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item2") %>' runat="server"><%#ProductLocationName.Item2()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem3" CommandName="Item3" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item3") %>' runat="server"><%#ProductLocationName.Item3()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem4" CommandName="Item4" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item4") %>' runat="server"><%#ProductLocationName.Item4()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem5" CommandName="Item5" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item5") %>' runat="server"><%#ProductLocationName.Item5()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem6" CommandName="Item6" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item6") %>' runat="server"><%#ProductLocationName.Item6()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem7" CommandName="Item7" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item7") %>' runat="server"><%#ProductLocationName.Item7()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem8" CommandName="Item8" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item8") %>' runat="server"><%#ProductLocationName.Item8()%></asp:LinkButton>
                                        <asp:LinkButton ID="BItem9" CommandName="Item9" CommandArgument='<%# Eval("ID") %>'
                                            CssClass='<%# LocationClass(int.Parse(Eval("ID").ToString()),"Item9") %>' runat="server"><%#ProductLocationName.Item9()%></asp:LinkButton>
                                    </p>
                                </td>
                                <td style="width: 55px" class="ys_red">
                                    ￥<%#Eval("ProductPrice") %>
                                </td>
                                <td align="center" class="ys_crude" style="width: 30px">
                                    <%# Common.GetProductStock(int.Parse(Eval("ID").ToString())) %>
                                </td>
                                <td style="width: 120px">
                                    <p>
                                        分类：<a href="../../list.aspx?id=<%# Eval("CategoryID") %>" target="_blank" class="blue"><%#Common.GetCategoryName(int.Parse(Eval("CategoryID").ToString()))%></a></p>
                                    <p>
                                        货号：<%#Eval("ProductNumber")%></p>
                                </td>
                                <td>
                                    <p>
                                        [<a href='AddProduct.aspx?id=<%#Eval("ID") %>&act=update&keepThis=true&placeValuesBeforeTB_=savedValues&TB_iframe=true&height=450&width=780'
                                            class="thickbox" title="编辑">编辑</a>]</p>
                                    <p>
                                        [<a href="AddProduct.aspx?id=<%#Eval("ID") %>&act=copy" class="blue">复制</a>]</p>
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:Repeater>
                </tbody>
            </table>
        </div>
    </div>
    <div class="footer">
        <div class="txte">
        </div>
        <webdiyer:AspNetPager ID="AspNetPagerItem" runat="server" CssClass="yahoo2" AlwaysShow="True"
            OnPageChanged="AspNetPagerItem_PageChanged" PageSize="25">
        </webdiyer:AspNetPager>
    </div>
    </form>
</body>
</html>
