<%@ page language="C#" validaterequest="false" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_buyTeam, WebApp_deploy" title="团购中的商品" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <script type="text/javascript" src="../Js/howave_time.js"></script>
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="pageTitle">
        <asp:Label ID="Label3" runat="server" Text=""></asp:Label></div>
    <br />
    <table class="SearchTableStyle">
        <tr class="tdbg">
            <td class="tdbg5">
                查找：
            </td>
            <td class="tdbg5">
                <asp:DropDownList ID="DropDownList1" runat="server">
                    <asp:ListItem Text="当前团购中" Value="0" />
                    <asp:ListItem Text="历史团购情况" Value="1" />
                </asp:DropDownList>
            </td>
            <td class="tdbg5">
                卖家名称：
            </td>
            <td class="tdbg5">
                <asp:TextBox ID="TxtSalerName" runat="server" />
            </td>
            <td class="tdbg5">
                商品名称：
            </td>
            <td class="tdbg5">
                <asp:TextBox ID="TxtProductName" runat="server" />
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5" align="center" colspan="6">
                <asp:Button ID="QuickSearch" Text=" 查 询 " runat="server" OnClick="QuickSearch_OnClick" />
            </td>
        </tr>
    </table>
    <br />
    <asp:GridView ID="GridView1" runat="server" ForeColor="Black" DataKeyNames="ProductID"
        AllowPaging="True" AutoGenerateColumns="False" CssClass="tableHead">
        <Columns>
            <asp:TemplateField>
                <HeaderTemplate>
                    预订单号</HeaderTemplate>
                <ItemStyle Width="16%" />
                <ItemTemplate>
                    <a href='<%#"Shop_BuyOrder.aspx?OrderFormNum="+Eval("OrderFormNum") %>'>
                        <%#Eval("OrderFormNum") %></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>
                    商品名称</HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="LbProductName" runat="server" Text='<%#ShowProductName(Eval("ProductID").ToString()) %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="Quantity" HeaderText="预订量" ItemStyle-Width="10%" />
            <asp:BoundField DataField="MoneyReceipt" HeaderText="已付款" ItemStyle-Width="10%" />
            <asp:TemplateField>
                <HeaderTemplate>
                    团购记录</HeaderTemplate>
                <ItemStyle Width="10%" />
                <ItemTemplate>
                    <a href='<%#"Shop_TeamSum.aspx?ProductID="+Eval("ProductID")+"&OrderFormID="+Eval("OrderFormID") %>'>
                        <asp:Label ID="Label2" runat="server" Text='<%#TeamRecord(Eval("Teameffect").ToString()) %>'></asp:Label></a>
                </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="状态">
                <HeaderStyle Width="8%" />
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%#Eval("Teameffect").ToString()=="1"?"团购成功":"团购中" %>'></asp:Label>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <PagerStyle CssClass="productPageStyle" />
        <EmptyDataTemplate>
            <table class="tableHeader" style="width: 98%">
                <tr>
                    <th>
                        商品名称
                    </th>
                    <th>
                        当前价
                    </th>
                    <th>
                        开始时间
                    </th>
                    <th>
                        结束时间
                    </th>
                    <th>
                        状态
                    </th>
                    <th>
                        操作
                    </th>
                    <tr>
                        <td colspan="6">
                            没有符合查询条件的记录！
                        </td>
                    </tr>
            </table>
        </EmptyDataTemplate>
    </asp:GridView>
</asp:Content>
