<%@ page language="C#" masterpagefile="../ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_TeamBuy, HoWaveVGO" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script type="text/javascript" src="../Js/howave_time.js"></script>
<div class="pageTitle"><asp:Literal ID="TeamBuyTitle" runat="server" Text="团购中商品" /></div>
&nbsp;
<asp:RadioButtonList ID="TeamBuyOrderStauts" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" AutoPostBack="true" OnSelectedIndexChanged="TeamBuyOrderStauts_SelectedIndexChanged">
   <asp:ListItem Text="团购中商品" Value="团购中" Selected="True" />
   <asp:ListItem Text="团购订单商品" Value="已经确认" />
</asp:RadioButtonList> 
<asp:GridView ID="GridView1" runat="server"  CssClass="tableHead" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" AllowPaging="True" OnRowDataBound="GridView1_RowDataBound" GridLines="Horizontal" >
         <Columns>
             <asp:TemplateField HeaderText="商品名称">                 
                 <ItemTemplate>
                    <asp:HyperLink ID="ProductNameUrl" runat="server" Text='<%# Eval("ProductName") %>' NavigateUrl='<%#"../Auction/Auction.aspx?ProductID="+Eval("ProductID") %>' Target="_blank"/>
                    <asp:HiddenField ID="H_ProductID" Value='<%#Eval("ProductID") %>' runat="server" />
                 </ItemTemplate>
                 <ItemStyle Width="22%" />
             </asp:TemplateField>
             <asp:BoundField DataField="OrderNum" HeaderText="下订人数">
                 <ItemStyle Width="8%" />
             </asp:BoundField>                      
             <asp:TemplateField HeaderText="团购数量">                
                 <ItemTemplate>
                     <asp:Literal ID="OrderQuantityNum" Text='<%# Eval("OrderQuantityNum")+"&nbsp;"+Eval("PUnit")%>' runat="server" />
                 </ItemTemplate>
                  <ItemStyle Width="10%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="剩余时间">                
                 <ItemTemplate>
                     <asp:Literal ID="LeftTime" Text='<%#"<script>showlefttime("+ Eval("LeftTime")+")</script>" %>' runat="server" Visible="false"/>
                     <asp:Literal ID="CreateTime" Text='<%# Eval("UpdateTime") %>' runat="server"  Visible="false"/>
                 </ItemTemplate>
                  <ItemStyle Width="10%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="团购巴士">                
                 <ItemTemplate>
                     <asp:Literal ID="TranTeam" Text='<% #Eval("TranTeam")%>' runat="server" />
                 </ItemTemplate>
                  <ItemStyle Width="15%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="团购轮数">                
                 <ItemTemplate>
                     <asp:Literal ID="TeamBuyLeavel" Text='<% #Eval("TeamBuyLeavel")%>' runat="server" />
                 </ItemTemplate>
                  <ItemStyle Width="8%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="未付定金">                
                 <ItemTemplate>
                     <asp:HyperLink ID="TeamNotPay" runat="server"   NavigateUrl='<%#"Shop_SaleTeamSum.aspx?ProductID="+ Eval("ProductID")+"&BusType=-1&TeamBuyLeavel=-1&ProductName="+Server.UrlEncode(Convert.ToString(Eval("ProductName"))) %>' ToolTip="查看未付定金订单信息"/>
                 </ItemTemplate>
                  <ItemStyle Width="8%" />
             </asp:TemplateField>
          
              <asp:TemplateField HeaderText="操作">                
                 <ItemTemplate>
                    <asp:HyperLink ID="ShopSalerOrderListDetail" runat="server" Text="查看" NavigateUrl='<%#"Shop_SaleTeamSum.aspx?ProductID="+ Eval("ProductID")+"&BusType="+ Eval("TranTeam")+"&TeamBuyLeavel="+Eval("TeamBuyLeavel")+"&ProductName="+Server.UrlEncode(Convert.ToString(Eval("ProductName"))) %>' />

                    
                 </ItemTemplate>
                  <ItemStyle Width="15%" />
             </asp:TemplateField>
         </Columns>
         <EmptyDataTemplate>
            <div class="empty_style">暂无团购商品!</div>
         </EmptyDataTemplate>
        
     </asp:GridView>

    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetTeamBuyOrderBySalerIDStatusIsWaitting" TypeName="Shop_Order" OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:SessionParameter Name="SalerID" SessionField="Howave_UserID" Type="Int32" />
            <asp:ControlParameter ControlID="TeamBuyOrderStauts" DefaultValue="团购中" Name="Status"
                PropertyName="SelectedValue" Type="String" />
            <asp:Parameter DefaultValue="true" Name="IsWaitting" Type="Boolean" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

