<%@ page language="C#" masterpagefile="~/Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_Stock_StockOutManage, WebApp_deploy" title="缺货登记管理" %>

<asp:Content ID="cphContent" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <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">
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <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="OutStockLogID" />
                            <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")%>
                                    </a>
                                </ItemTemplate>
                                <ItemStyle Width="20%" HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="商家名称" DataField="SalerName" />
                            <asp:TemplateField HeaderText="商品类型">
                                <ItemTemplate>
                                    <%# HoWave.Web.Shop.TextFormat.GetProductType(Eval("ProductType").ToString()) %>
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="订购数量" DataField="BookCount" />
                            <asp:BoundField HeaderText="买家名称" DataField="UserName" />
                            <asp:TemplateField HeaderText="联系方式">
                                <ItemTemplate>
                                    <%# GetContacPhone(Eval("Email").ToString(),Eval("MobilePhone").ToString())%>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" />
                            </asp:TemplateField>
                            <asp:BoundField HeaderText="记录时间" DataField="InputDate" />
                            <asp:TemplateField HeaderText="发送方式">
                                <ItemTemplate>
                                    <asp:Image ID="imgEmail" ImageUrl="~/Images/Client/mail_gray.gif" runat="server" />
                                    <asp:Image ID="imgMobile" ImageUrl="~/Images/Client/phone_gray.gif" runat="server" />
                                    <asp:HiddenField ID="hfEmail" runat="server" Value='<%# Eval("EmailStatus") %>' />
                                    <asp:HiddenField ID="hfMobile" runat="server" Value='<%# Eval("MobileStatus") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="状态">
                                <ItemTemplate>
                                    <%# GetStatus(Eval("NoticeStatue"))%>
                                </ItemTemplate>
                            </asp:TemplateField>
                        </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>
                                    <th>
                                        状态
                                    </th>
                                </tr>
                                <td colspan="10" style="text-align: center">
                                    没有符合条件的缺货记录！
                                </td>
                            </table>
                        </EmptyDataTemplate>
                    </asp:GridView>
                    <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="SeachBut" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
        </asp:Panel>
    </div>
</asp:Content>
