<%@ page language="C#" validaterequest="false" masterpagefile="../ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_buyTeam, HoWaveVGO" title="团购中的商品" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" src="../Js/howave_time.js"></script>
 <asp:ScriptManager ID="ScriptManager1" runat="Server" EnablePartialRendering="True" /> 
 <div class="pageTitle">团购中的商品</div> 
 <br />             
     <table class="SearchTableStyle">
        <tr class="tdbg">
           <td class="tdbg5">起始日期：</td>
           <td class="tdbg5"><asp:TextBox ID="TxtBeginDate" runat="server" Height="16px" /></td>
           <td class="tdbg5">结束日期：</td>
           <td class="tdbg5"><asp:TextBox ID="TxtEndDate" runat="server" Height="16px"/></td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5">卖家名称：</td>
            <td class="tdbg5"><asp:TextBox ID="TxtSalerName" runat="server" Height="16px"/></td>
            <td class="tdbg5">商品名称：</td>
            <td class="tdbg5"><asp:TextBox ID="TxtProductName" runat="server" Height="16px"/></td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5" align="center" colspan="4"><asp:Button ID="QuickSearch" Text="查 询" runat="server" /></td>
        </tr>
        </table>  
        <br />
        <table class="SearchTableStyle">
        <tr><td>
           你现在查看的是：  <asp:DropDownList ID="DropMoment" runat="server" Width="99px" AutoPostBack="True">
                <asp:ListItem Selected="True">今天的团购</asp:ListItem>
                <asp:ListItem>近10天的团购</asp:ListItem>
                <asp:ListItem>近一个月的团购</asp:ListItem>
                <asp:ListItem>所有团购</asp:ListItem>
            </asp:DropDownList>
            <asp:Label ID="LabErro" runat="server"  ForeColor="Red" />
        </td></tr>
        </table>
        <br />
<%--       <asp:UpdatePanel ID="UpdatePanel1" runat="server" >
             <ContentTemplate>--%>
    <asp:GridView id="GridView1" runat="server" ForeColor="Black" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" 
                  DataKeyNames="OrderFormID" AllowPaging="True"  OnDataBound="GridView1_DataBound" DataSourceID="ObjectDataSource1" 
                  AutoGenerateColumns="False" CssClass="tableHead">
    <Columns>
        <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="Shop_PreOrder.aspx?OrderFormNum={0}"
            DataTextField="OrderFormNum" HeaderText="预订单号" >
            <HeaderStyle Width="10%"  />
        </asp:HyperLinkField>
        <asp:TemplateField HeaderText="商品">
            <HeaderStyle Width="7%"/>
            <ItemTemplate>
               <asp:HyperLink ID="ProductName"  Target="_blank" runat="server" Text='<%# Eval("ProductName") %>' NavigateUrl='<%#"../Auction/Auction.aspx?ProductID="+Eval("Productid") %>' />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="团购类型">
            <HeaderStyle Width="5%"/>
            <ItemTemplate>
               <asp:Literal ID="TeamType" runat="server" Text='<%# Bind("RegularBus") %>'/>                                       
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="我预订量">
        <HeaderStyle Width="5%"/>
            <ItemTemplate>
               <asp:Literal ID="Quantity" runat="server" Text='<%# Bind("Quantity") %>'/>                                    
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="已付款">
            <HeaderStyle Width="5%"/>
            <ItemTemplate>
               <asp:Literal ID="Literal4" runat="server" Text='<%# Bind("MoneyReceipt") %>'/>                                    
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="剩余时间">
        <HeaderStyle Width="5%"/>
        <ItemTemplate>
           <asp:Literal runat="Server" ID="EndDate" Text='<%#"<script>showlefttime("+ Eval("LeftTime")+")</script>" %>'/>                                    
        </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="团购记录">
        <HeaderStyle Width="7%"/>
        <ItemTemplate>
           <asp:HyperLink ID="TeamSalerName" runat="server" Text='详细'  NavigateUrl='<%# "Shop_TeamSum.aspx?ProductID="+Eval("ProductID")%>' />
                                    
        </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="交易状态">
            <HeaderStyle Width="5%"/>
            <ItemTemplate>
               <asp:HyperLink ID="TradeStatus" runat="server"   Text='<%#Eval("Status") %>'/>                           
            </ItemTemplate>
        </asp:TemplateField>       
        </Columns>
        <EmptyDataTemplate>                   
              <div style="padding:10px;">没有符合查询条件的记录！</div>
        </EmptyDataTemplate>
    </asp:GridView> 
<%--</ContentTemplate>
              <Triggers >
<asp:AsyncPostBackTrigger ControlID="DropMoment" EventName="SelectedIndexChanged"></asp:AsyncPostBackTrigger>
</Triggers>
         </asp:UpdatePanel> --%>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetOrderByUserIDByTradeType"
                    TypeName="Shop_Order"  UpdateMethod="GetOrderByManyCondition">
                    <SelectParameters>
                        <asp:SessionParameter Name="UserID" SessionField="Howave_UserID" Type="Int32" />
                        <asp:Parameter DefaultValue="team" Name="TradeType" Type="String" />
                        <asp:Parameter DefaultValue="buyer_orders" Name="OrderType" Type="String" />
                    </SelectParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="UserIDSalerID" Type="Int32" />
                        <asp:Parameter Name="Moment" Type="String" />
                        <asp:Parameter Name="BeginDate" Type="String" />
                        <asp:Parameter Name="EndDate" Type="String" />
                        <asp:Parameter Name="OrderFormNum" Type="String" />
                        <asp:Parameter Name="BeginOrderID" Type="Int32" />
                        <asp:Parameter Name="EndOrderID" Type="Int32" />
                        <asp:Parameter Name="BeginMoney" Type="Decimal" />
                        <asp:Parameter Name="EndMoney" Type="Decimal" />
                        <asp:Parameter Name="Status" Type="String" />
                        <asp:Parameter Name="PayStatic" Type="String" />
                        <asp:Parameter Name="DeliverStatus" Type="String" />
                        <asp:Parameter Name="UserName" Type="String" />
                        <asp:Parameter Name="ContacterName" Type="String" />
                        <asp:Parameter Name="Email" Type="String" />
                        <asp:Parameter Name="Address" Type="String" />
                        <asp:Parameter Name="Phone" Type="String" />
                        <asp:Parameter Name="Mobile" Type="String" />
                        <asp:Parameter Name="Remark" Type="String" />
                        <asp:Parameter Name="ProductName" Type="String" />
                        <asp:Parameter Name="TransSize" Type="String" />
                    </UpdateParameters>
                </asp:ObjectDataSource>
            
</asp:Content>

