<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_ProductRecycleManage, WebApp_deploy" title="回收站管理" %>

<asp:Content ID="cphContent" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div class="pageTitle" style="line-height: 30px; vertical-align: middle;">
        &nbsp;&nbsp;&nbsp;&nbsp;<asp:Literal ID="ltrTitle" runat="server">回收站管理</asp:Literal></div>
    <div class="TabText">
        <asp:PlaceHolder ID="phManage" runat="server">
            <table class="SearchTableStyle">
                <tr>
                    <th colspan="3" style="float: left; text-align: left">
                        &nbsp;<b>高级查询：</b>
                    </th>
                </tr>
                <tr>
                    <td>
                        &nbsp;商品类型：<asp:DropDownList ID="ddlProdcutType" runat="server">
                            <asp:ListItem Value="0">全部</asp:ListItem>
                            <asp:ListItem Value="1">一口价</asp:ListItem>
                            <asp:ListItem Value="2">拍卖</asp:ListItem>
                            <asp:ListItem Value="3">团购</asp:ListItem>
                            <asp:ListItem Value="4">促销(秒杀)</asp:ListItem>
                            <asp:ListItem Value="5">积分商品</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                    <td>
                        &nbsp;商品名称：<asp:TextBox ID="txtProductName" CausesValidation="false" runat="server"></asp:TextBox>
                        &nbsp;<asp:Button ID="SeachBut" runat="server" Text="查询" OnClick="SeachBut_Click" />
                    </td>
                    <td>
                        &nbsp;
                    </td>
                </tr>
            </table>
            <br />
            <asp:GridView ID="gvManage" CssClass="tableHead" runat="server" AutoGenerateColumns="false"
                AllowPaging="True" OnRowDataBound="gvManage_RowDataBound" OnPageIndexChanging="gvManage_PageIndexChanging"
                PageSize="10">
                <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <input type="checkbox" id="SelectId" name="SelectId" value='<%# Eval("ProductID") %>' />
                        </ItemTemplate>
                        <HeaderTemplate>
                            &nbsp;&nbsp;<input type="checkbox" id="chkAll" onclick="SelectAllCheckboxes(this,'SelectId')" />&nbsp;
                        </HeaderTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="编号" DataField="ProductID" />
                    <asp:TemplateField HeaderText="图片">
                        <HeaderStyle Width="110px" />
                        <ItemTemplate>
                            <a href='<%# "../../ShowProduct.aspx?ProductID="+Eval("ProductID") %>' target="_blank">
                                <asp:Image ID="Image1" runat="server" ImageUrl='<%# (Convert.ToString(Eval("ProductSmallImageUrl"))==""?"../../Images/show_nopic.gif":"../../"+Eval("ProductSmallImageUrl").ToString()) %>'
                                    Height="80px" Width="80px" />
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="商品名称">
                        <ItemTemplate>
                            <a href='<%# "../../ShowProduct.aspx?ProductID="+Eval("ProductID") %>' target="_blank">
                                <%#Eval("ProductName")%>
                                <%--<%#Eval("ProductName").ToString().Length > 20 ? Eval("ProductName").ToString().Substring(0, 18)+"..." : Eval("ProductName")%>--%>
                            </a>
                        </ItemTemplate>
                        <HeaderStyle Width="200px" HorizontalAlign="Center" />
                        <ItemStyle HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="点击数" DataField="Hits" />
                    <asp:BoundField HeaderText="单位" DataField="PUnit" />
                    <asp:BoundField HeaderText="价格" DataField="StandPrice" />
                    <asp:TemplateField HeaderText="状态">
                        <ItemTemplate>
                            <%#GetStatus(Eval("IsDeleted"))%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnUpdate" CommandName="EditBack" CommandArgument='<%# Eval("ProductID")%>'
                                OnCommand="Button_Command" runat="server">还原</asp:LinkButton>
                            &nbsp;&nbsp;<asp:LinkButton ID="lbtnDelete" CommandName="DelInfo" CommandArgument='<%# Eval("ProductID") %>'
                                OnCommand="Button_Command" runat="server" OnClientClick="return confirm('确定要删除该信息吗？');">彻底删除</asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                    <table class="tableHead" width="100%">
                        <tr>
                            <th>
                                编号
                            </th>
                            <th>
                                图片
                            </th>
                            <th>
                                商品名称
                            </th>
                            <th>
                                点击数
                            </th>
                            <th>
                                单位
                            </th>
                            <th>
                                价格
                            </th>
                            <th>
                                状态
                            </th>
                        </tr>
                        <td colspan="7" style="text-align: center">
                            没有符合条件的商品数据！
                        </td>
                    </table>
                </EmptyDataTemplate>
            </asp:GridView>
            <table class="SearchTableStyle" style="text-align: left">
                <tr>
                    <td class="page" style="float: left">
                        &nbsp;&nbsp;&nbsp;&nbsp;
                        <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal>
                        &nbsp;&nbsp;&nbsp;&nbsp;
                    </td>
                </tr>
                <tr>
                    <td style="line-height: 30px">
                        &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnMoreDelete" CommandName="MoreDelete" OnCommand="Button_Command"
                            runat="server" Text="批量彻底删除" />
                        &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnMoreBack" CommandName="MoreBakc" OnCommand="Button_Command"
                            runat="server" Text="批量还原" />
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;&nbsp;&nbsp;&nbsp;注：系统默认不删除有订单的商品！
                    </td>
                </tr>
            </table>
        </asp:PlaceHolder>
    </div>
</asp:Content>
