<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_ShopProductSold, HoWaveVGO" title="已出售商品" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <div class="pageTitle">已卖出的商品</div>
 <br />
 <table class="SearchTableStyle">
       <tr class="tdbg">
           <td class="tdbg5">成交时间：</td>
           <td class="tdbg5" colspan="2">从&nbsp;<asp:DropDownList ID="start_year" runat="server" width="55px" AppendDataBoundItems="True"><asp:ListItem Selected="True" Value="-1">不限</asp:ListItem>
       </asp:DropDownList>&nbsp;年&nbsp;
       <asp:DropDownList ID="start_month" runat="server" width="50px" AppendDataBoundItems="True" >
          <asp:ListItem Selected="True" Value="-1">不限</asp:ListItem>
       </asp:DropDownList>&nbsp;月&nbsp;
       <asp:DropDownList ID="start_day" runat="server" width="50px" AppendDataBoundItems="True">                            
          <asp:ListItem Selected="True" Value="-1">不限</asp:ListItem>
       </asp:DropDownList>&nbsp;日&nbsp;
       </td>
       <td class="tdbg5" colspan="3">
       到&nbsp;
       <asp:DropDownList ID="last_year" runat="server" width="55px" AppendDataBoundItems="True">                                  
          <asp:ListItem Selected="True" Value="-1">不限</asp:ListItem>                      
       </asp:DropDownList>&nbsp;年&nbsp;
       <asp:DropDownList ID="last_month" runat="server" width="50px" AppendDataBoundItems="True" >                       
            <asp:ListItem Selected="True" Value="-1">不限</asp:ListItem>                        
       </asp:DropDownList>&nbsp;月&nbsp;
       <asp:DropDownList ID="last_day" runat="server" width="50px" AppendDataBoundItems="True">                          
          <asp:ListItem Selected="True" Value="-1">不限</asp:ListItem>                        
       </asp:DropDownList>&nbsp;日&nbsp;
    </td>
    </tr>
    <tr class="tdbg">
        <td class="tdbg5">商品名称：</td>
    <td class="tdbg5">
        <asp:TextBox ID="product_name" runat="server"  Width="100px" Height="16px" />&nbsp;&nbsp;
    </td>
    <td class="tdbg5">卖家昵称：</td>
    <td class="tdbg5">
        <asp:textbox ID="saler_name" runat="server" Width="100px" Height="16px" />&nbsp;&nbsp;
    </td>
    <td class="tdbg5">交易状态：</td>
    <td class="tdbg5">
         <asp:DropDownList ID="trade_status" runat="server" Width="150px">
            <asp:ListItem Text="全部" Value="all" />
            <asp:ListItem Text="等待买家付款" Value="wait_to_buyer_pay" />
            <asp:ListItem Text="等待卖家发货" Value="wait_to_saler" />
            <asp:ListItem Text="卖家已发货，等待买家确认" Value="wait_to_buyer_confirm" />
            <asp:ListItem Text="买家确认收货，等待第三方通知" Value="both_wait_confirm" />
            <asp:ListItem Text="交易成功" Value="trade_success" />
            <asp:ListItem Text="交易关闭" Value="trade_close" />         
         </asp:DropDownList>
     </td>
     </tr>
     <tr class="tdbg">
         <td class="tdbg5" align="center" colspan="6">
         <asp:Button ID="search_btn" runat="server" Text="查询" />
     </td>
     </tr>
 </table>
 <br />
 <div style="width:98%; clear:both;">
    <div style="float:left; padding-top:10px;padding-left:5px; ">&nbsp;商品类型：</div>
    <div style="float:left">
        <asp:RadioButtonList ID="ProductType" runat="server" RepeatDirection="Horizontal"  AutoPostBack="true">
           <asp:ListItem Text="一口价" Value="一口价" Selected="True" />
           <asp:ListItem Text="拍卖" Value="拍卖" />         
        </asp:RadioButtonList>
    </div>
 </div>
 <div style="clear:both"></div>
 <div id="product_history">
     <asp:GridView ID="GridView1" runat="server" CssClass="tableHead" width="98%" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" AllowPaging="True" OnDataBound="GridView1_DataBound" GridLines="Horizontal">
         <Columns>
             <asp:TemplateField HeaderText="商品名称">                 
                 <ItemTemplate>
                    <asp:HyperLink ID="ProductNameUrl" runat="server" Text='<%# Bind("ProductName") %>' NavigateUrl='<%#"../Auction/Auction.aspx?ProductID="+Eval("ProductID") %>'  Target="_blank"/>
                 </ItemTemplate>
                 <ItemStyle Width="30%" />
             </asp:TemplateField>
             <asp:BoundField DataField="MoneyGoods" HeaderText="价格"  ItemStyle-Width="10%"/>
             <asp:BoundField DataField="InputTime" HeaderText="成交时间" ItemStyle-Width="15%"/>
             <asp:TemplateField HeaderText="联络买家">                
                 <ItemTemplate>
                     <asp:HyperLink ID="BuyerName" runat="server" Text='<%# Bind("BuyerName") %>'  NavigateUrl='<%#"../Shop1/Shop_ShopIntro.aspx?UserID="+Eval("UserID") %>'/>
                 </ItemTemplate>
                  <ItemStyle Width="15%" />
             </asp:TemplateField>
             <asp:TemplateField HeaderText="交易状态">                 
                 <ItemTemplate>
                 <asp:HyperLink ID="Status" runat="server" Text='<%#Eval("Status")%>'/>
                  <%--  <asp:HyperLink ID="Status" runat="server" Text='<%#Eval("Status")%>' NavigateUrl='<%#"https://www.alipay.com/trade/query_trade_detail.htm?trade_no="+Eval("OnLinePayTradeNo") %>'/>--%>
                 </ItemTemplate>
                 <ItemStyle Width="15%" />
             </asp:TemplateField>
              <asp:TemplateField HeaderText="评价">                
                 <ItemTemplate>
                     <asp:HyperLink ID="review" runat="server" Text="评价" NavigateUrl='<%#"Shop_AddReview.aspx?&TransSize=1&ItemID="+Eval("OrderFormID")+"&ProductID="+Eval("ProductID")+"&ProductName="+Server.UrlEncode(Convert.ToString(Eval("ProductName")))+"&ReviewerID="+Eval("UserID")+"&ReviewerName="+Eval("BuyerName") %>' />
                     <asp:HiddenField ID="BuyerReviewStatus" runat="server" Value='<%# Eval("BuyerReview") %>' />
                     <asp:HiddenField ID="SalerReviewStatus" runat="server" Value='<%# Eval("SalerReview") %>' />
                 </ItemTemplate>
                  <ItemStyle Width="15%" />
             </asp:TemplateField>
         </Columns>
         <EmptyDataTemplate>
            <div class="empty_style">暂无记录!</div>
         </EmptyDataTemplate>
         <PagerStyle CssClass="productPageStyle" />     
     </asp:GridView>
 </div>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetOrderByUserIDByTradeType" TypeName="Shop_Order" OldValuesParameterFormatString="original_{0}">
        <SelectParameters>
            <asp:SessionParameter Name="UserID" SessionField="Howave_UserID" Type="Int32" />
            <asp:ControlParameter ControlID="ProductType" DefaultValue="一口价" Name="TradeType"
                PropertyName="SelectedValue" Type="String" />
            <asp:Parameter DefaultValue="saler_orders" Name="OrderType" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

