<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_StockManage_StockOutManage, 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>
            <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("OutStockLogID") %>' />
                        </ItemTemplate>
                        <HeaderTemplate>
                            &nbsp;&nbsp;<input type="checkbox" id="chkAll" onclick="SelectAllCheckboxes(this,'SelectId')" />&nbsp;
                        </HeaderTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="编号" DataField="OutStockLogID" />
                    <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="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>
                    <asp:TemplateField HeaderText="操作">
                        <ItemTemplate>
                            <asp:LinkButton ID="lbtnUpdate" CommandName="DeleteInfo" CommandArgument='<%# Eval("OutStockLogID")%>'
                                OnCommand="Button_Command" runat="server">删除</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>
            <div style="text-align: center;">
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal>
                &nbsp;&nbsp;&nbsp;&nbsp;</div>
            <div>
                &nbsp;&nbsp;&nbsp;&nbsp;<asp:Button ID="btnMoreInStock" CommandName="MoreDeleteInfo"
                    OnCommand="Button_Command" runat="server" Text="批量删除" />
            </div>
            <br />
        </asp:PlaceHolder>
    </div>
</asp:Content>
