<%@ page language="C#" masterpagefile="~/Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_Stock_ReStockList, WebApp_deploy" title="补货清单管理" %>

<asp:Content ID="cphContent" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table class="nick" id="table_item" runat="server">
        <tr>
            <td class="tit left1">
                &nbsp;&nbsp;<asp:Literal ID="ltrTitle" runat="server">补货清单管理</asp:Literal>
            </td>
        </tr>
    </table>
    <div class="TabText">
        <asp:Panel ID="phManage" runat="server">
            <table class="nick">
                <tr>
                    <td colspan="4" class="tit">
                        &nbsp;查询：
                    </td>
                </tr>
                <tr>
                    <td class="ltd">
                        &nbsp;高级查询：
                    </td>
                    <td class="rtd">
                        &nbsp;<asp:DropDownList ID="ddlDetailSearchType" runat="server" AppendDataBoundItems="True">
                            <asp:ListItem Selected="True" Value="product_name" Text="按商品名称" />
                            <asp:ListItem Value="saler_name" Text="按商家名称" />
                        </asp:DropDownList>
                        <asp:TextBox ID="DetailSearchName" runat="server" Width="150px" AutoPostBack="false" />
                    </td>
                    <td class="ltd">
                        &nbsp;商品类型：
                    </td>
                    <td class="rtd">
                        &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>
                        &nbsp;<asp:Button ID="SeachBut" runat="server" Text="查询" OnClick="SeachBut_Click" />
                    </td>
                </tr>
            </table>
            <asp:GridView ID="gvManage" CssClass="adminlist" runat="server" AutoGenerateColumns="false"
                AllowPaging="True" OnRowDataBound="gvManage_RowDataBound" OnPageIndexChanging="gvManage_PageIndexChanging"
                PageSize="10">
                <Columns>
                    <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="商品名称" ItemStyle-HorizontalAlign="Center">
                        <ItemTemplate>
                            <a href='<%# "../../ShowProduct.aspx?ProductID="+Eval("ProductID") %>' target="_blank">
                                <%#Eval("ProductName").ToString().Length > 10 ? Eval("ProductName").ToString().Substring(0, 8)+"..." : Eval("ProductName")%>
                            </a>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="商家名称" DataField="SalerName" />
                    <asp:BoundField HeaderText="订购数量" DataField="BookNum" />
                    <asp:BoundField HeaderText="库存" DataField="Stocks" />
                    <asp:TemplateField HeaderText="需要补货数量">
                        <ItemTemplate>
                            <asp:Literal ID="ltrAddStock" runat="server"></asp:Literal>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="单位" DataField="PUnit" />
                    <asp:BoundField HeaderText="价格" DataField="StandPrice" />
                </Columns>
                <EmptyDataTemplate>
                    <table class="adminlist" width="100%">
                        <tr>
                            <th>
                                编号
                            </th>
                            <th>
                                图片
                            </th>
                            <th>
                                商品名称
                            </th>
                            <th>
                                商家名称
                            </th>
                            <th>
                                订购数量
                            </th>
                            <th>
                                库存
                            </th>
                            <th>
                                需要补货数量
                            </th>
                            <th>
                                单位
                            </th>
                            <th>
                                价格
                            </th>
                        </tr>
                        <td colspan="9" style="text-align: center">
                            没有符合条件的商品数据！
                        </td>
                    </table>
                </EmptyDataTemplate>
            </asp:GridView>
            <div style="text-align: center;">
                <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal></div>
        </asp:Panel>
    </div>
</asp:Content>
