<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_TeamBuy, mallz" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script type="text/javascript" src="Js/mallz_time.js"></script>
<div class="pageTitle"><asp:Literal ID="TeamBuyTitle" runat="server" Text="团购商品管理" /></div>

<asp:PlaceHolder ID="ListPanel" runat="server">

<table class="SearchTableStyle">
        <tr class="tdbg">
            <td class="tdbg5">团购情况：</td>
            <td class="tdbg6">
                <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="tdbg6"><asp:TextBox ID="TxtProductName" runat="server" Height="16px"/></td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg6" align="center" colspan="4"><asp:Button ID="QuickSearch" Text="查 询" runat="server" OnClick="QuickSearch_OnClick" /></td>
        </tr>
</table>

<br />
<asp:GridView ID="GridView1" runat="server"  CssClass="tableHead" AutoGenerateColumns="False" AllowPaging="True" OnRowDataBound="GridView1_RowDataBound" >
         <Columns>
             <asp:TemplateField HeaderText="商品名称">
                 <ItemTemplate>
                    <asp:HyperLink ID="ProductNameUrl" runat="server" Text='<%# Eval("ProductName") %>' NavigateUrl='<%#"../ShowProduct.aspx?ProductID="+Eval("ProductID") %>' Target="_blank"/>
                    <asp:HiddenField ID="H_ProductID" Value='<%#Eval("ProductID") %>' runat="server" />
                 </ItemTemplate>
             </asp:TemplateField>
             <asp:BoundField DataField="BuyTimes" HeaderText="订单数">
                 <ItemStyle Width="8%" />
             </asp:BoundField>                      
             <asp:TemplateField HeaderText="团购数量">
                 <ItemTemplate>
                     <asp:Literal ID="OrderQuantityNum" Text='<%# Eval("Quantity")+"&nbsp;"+Eval("PUnit")%>' runat="server" />
                 </ItemTemplate>
                  <ItemStyle Width="10%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="开始时间">                
                 <ItemTemplate>
                     <asp:Literal ID="LitBeginDate" Text='<%# Eval("BeginDate") %>' runat="server"/>
                 </ItemTemplate>
                  <ItemStyle Width="15%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="结束时间">
                 <ItemTemplate>
                     <asp:Literal ID="LitEndDate" Text='<%# Eval("EndDate") %>' runat="server"/>
                 </ItemTemplate>
                  <ItemStyle Width="15%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="当前期">
                 <ItemTemplate>
                     <asp:Literal ID="LitCycle" Text='<%# "第"+Eval("Cycle")+"期"%>' runat="server" />
                 </ItemTemplate>
                  <ItemStyle Width="8%" />
             </asp:TemplateField>
              <asp:TemplateField HeaderText="操作">
                 <ItemTemplate>
                    <asp:HyperLink ID="ShopSalerOrderListDetail" runat="server" Text="详细" NavigateUrl='<%# "Shop_TeamSum.aspx?action=record&ProductID=" + Eval("ProductID") %>'  />
                 </ItemTemplate>
                  <ItemStyle Width="8%" />
             </asp:TemplateField>
         </Columns>
         <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:PlaceHolder>

<asp:PlaceHolder ID="RecordPanel" runat="server" Visible="false">
        
    <asp:GridView ID="GridView2" runat="server" CssClass="tableHead" AutoGenerateColumns="False" AllowPaging="True" OnRowDataBound="GridView1_RowDataBound" >
        <Columns>
             <asp:BoundField DataField="OrderFormID" HeaderText="编号" />
             <asp:HyperLinkField DataNavigateUrlFields="UserID" DataNavigateUrlFormatString="/Shop/index.aspx?uid={0}" DataTextField="BuyerName" Target="_blank" HeaderText="买家名称" />
             <asp:BoundField DataField="InputTime" HeaderText="参与时间" />
             <asp:BoundField DataField="MoneyGoods" HeaderText="当前价" />
             <asp:BoundField DataField="MoneyReceipt" HeaderText="已收订金" />
             <asp:BoundField DataField="Cycle" DataFormatString="第{0}期" HeaderText="团购期" />
             <asp:TemplateField HeaderText="状态">
                <ItemTemplate>
                    <asp:Literal ID="litStatus" runat="server" Text='<%# GetStatus(Convert.ToInt32(Eval("MoneyReceipt")),Eval("Status").ToString()) %>' />
                </ItemTemplate>
             </asp:TemplateField>
         </Columns>
         <EmptyDataTemplate>
               <table class="tableHeader" style="width:98%"><tr><th>编号</th><th>买家名称</th><th>参与时间</th><th>当前价</th><th>已收订金</th><th>团购期</th><th>状态</th>
                    <tr><td colspan="7">没有符合查询条件的记录！</td></tr>
                    </table>
        </EmptyDataTemplate>
    </asp:GridView>
    <div style="text-align:center; margin-top:10px;"><input type="button" value=" 返 回 " name="cl" onclick="history.back();" /></div>

        
</asp:PlaceHolder>
</asp:Content>

