<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_MyProduct, HoWaveVGO" title="会员中心" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <div class="pageTitle"><asp:Literal ID="buy_type" runat="server" /></div>
<table class="SearchTableStyle">
   <tr>
       <td>商品名称：</td>
       <td><asp:TextBox ID="product_name" runat="server"  Width="100px"/></td>
        <td>交易状态：</td>
      <td><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>
      
       <td>卖家昵称：</td>
       <td><asp:textbox ID="saler_name" runat="server" Width="100px" /></td>
       <td>成交起始时间：</td>
       <td><asp:TextBox ID="TxtBeginDate" runat="server" /></td>   
      
   </tr>
   <tr>
      <td>评价状态：</td>
      <td><asp:DropDownList ID="ReviewStatus" runat="server">
         <asp:ListItem Text="全部"  Value="-1"/>          
         <asp:ListItem Text="需我评价" Value="0" />
         <asp:ListItem Text="我已评价"  Value="1" />   
         <asp:ListItem Text="对方已评"  Value="2"/>
         <asp:ListItem Text="双方已评" Value="3" /> 
      </asp:DropDownList></td>
      <td>结束时间：</td>
       <td><asp:TextBox ID="TxtEndDate" runat="server" /><asp:Button ID="search_btn" runat="server" Text="查询"  OnClick="QucikSearch_Click"/></td>   
   </tr>

</table>
<br />
<table class="SearchTableStyle">
   <tr><td>
       你现在查看的是：
       <asp:DropDownList ID="OrderHistory" runat="server">
          <asp:ListItem Text="近期交易记录" />
          <asp:ListItem Text="历史交易记录" />
       </asp:DropDownList>
   </td></tr>
</table>
<br />
 <div id="product_history">
     <asp:GridView ID="GridView1" runat="server"  AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" 
     RowStyle-HorizontalAlign="Center" CssClass="tableHead" AllowPaging="True" GridLines="Horizontal" OnRowDataBound="GridView1_RowDataBound" OnPageIndexChanging="GridView1_PageIndexChanging">
         <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="Label1" runat="server" Text='<%# Bind("SalerName") %>'  NavigateUrl='<%#"../Shop1/Shop_ShopIntro.aspx?UserID="+Eval("SalerID") %>'/>
                 </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=0&ItemID="+Eval("OrderFormID")+"&ProductID="+Eval("ProductID")+"&ProductName="+Server.UrlEncode(Convert.ToString(Eval("ProductName")))+"&ReviewerID="+Eval("SalerID")+"&ReviewerName="+Eval("SalerName") %>' />
                     <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 >                   
              <table  class="tableHead"  align="center">
                 <tr>                                 
                     <th>商品名称</th>
                     <th>价格</th>
                     <th>交易创建时间</th>
                     <th>联络卖家</th>
                     <th>交易状态</th>
                     <th>评价</th>                    
                 </tr>
                 <tr><td colspan="6" style="text-align:center">没有符合查询条件的记录！</td></tr>                             
              </table>                                   
        </EmptyDataTemplate> 
     </asp:GridView>
 </div>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetOrderByUserIDByTradeType" TypeName="Shop_Order" >
        <SelectParameters>
            <asp:SessionParameter Name="UserID" SessionField="Howave_UserID" Type="Int32" />
            <asp:QueryStringParameter DefaultValue="一口价" Name="TradeType" QueryStringField="type"
                Type="String" />
            <asp:Parameter DefaultValue="buyer_orders" Name="OrderType" Type="String" />
        </SelectParameters>
    </asp:ObjectDataSource>
</asp:Content>

