<%@ page language="C#" masterpagefile="../ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_BuyManageOrder, HoWaveVGO" title="订单列表" enableEventValidation="false" %>  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
<div class="pageTitle">订单管理</div>
<br />
 <table  class="SearchTableStyle">
         <tr>  
            <td>起始ID</td>
            <td class="tdbg5"><asp:TextBox ID="TxtBeginOrderID" runat="server" Height="16px" AutoPostBack="True"　/></td>
            <td class="tdbg5">终止ID</td>
            <td class="tdbg5"><asp:TextBox ID="TxtEndOrderID" runat="server"  Height="16px"  AutoPostBack="True"　/></td>
            <td class="tdbg5">订单状态：</td>
            <td><asp:DropDownList ID="DroOrderStatic" runat="server" AutoPostBack="True">
                    <asp:ListItem>等待确认</asp:ListItem>
                    <asp:ListItem>已经确认</asp:ListItem>
                    <asp:ListItem>交易成功</asp:ListItem>
                    <asp:ListItem Selected="True">所有</asp:ListItem>                   
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5">金额从</td>
            <td class="tdbg5"><asp:TextBox ID="TxtBeginMoney" runat="server" Height="16px" /></td>
            <td class="tdbg5">起始日期</td>
            <td class="tdbg5"><asp:TextBox ID="TxtBeginDate" runat="server" Height="16px" /></td>
            <td class="tdbg5">付款状态：</td>
            <td><asp:DropDownList ID="DroPayStatic" runat="server" AutoPostBack="True">
                    <asp:ListItem>等待付款</asp:ListItem>
                    <asp:ListItem>已付定金</asp:ListItem>
                    <asp:ListItem>已经付清</asp:ListItem>
                    <asp:ListItem Selected="True">所有状态</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5">&nbsp;至</td>
            <td class="tdbg5"><asp:TextBox ID="TxtEndMoney" runat="server" Height="16px" /></td>
            <td class="tdbg5">结束日期</td>
            <td class="tdbg5"><asp:TextBox ID="TxtEndDate" runat="server" Height="16px" /></td>
            <td class="tdbg5">物流状态：</td>
            <td><asp:DropDownList ID="DropDeliverStatus" runat="server" AutoPostBack="True">
                    <asp:ListItem>配送中 </asp:ListItem>
                    <asp:ListItem>已发货 </asp:ListItem>
                    <asp:ListItem>已签收 </asp:ListItem>
                    <asp:ListItem Selected="True">所有</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr class="tdbg">
            <td class="tdbg5" align="center" colspan="6"><asp:Button ID="QuickSearchBtn" Text="查询订单"  runat="server"/></td>
         
        </tr>
        </table> 
        <br />
        <table class="SearchTableStyle">
        <tr><td>
        你现在查看的是：  <asp:DropDownList ID="DropMoment" runat="server" Width="130px" AutoPostBack="True">
                <asp:ListItem Selected="True">今天的订单</asp:ListItem>
                <asp:ListItem>近10天的订单</asp:ListItem>
                <asp:ListItem>近一个月的订单</asp:ListItem>
                <asp:ListItem>所有订单</asp:ListItem>
              </asp:DropDownList>
        </td></tr>
        </table>
        <br />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
             DataSourceID="ObjectDataSource1"  AllowPaging="True"  
              OnSelectedIndexChanged="GridView1_SelectedIndexChanged" DataKeyNames="OrderFormID"  CssClass="tableHead" OnDataBound="GridView1_DataBound">
                    <Columns>                        
                        <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="Shop_BuyOrder.aspx?OrderFormNum={0}"
                            DataTextField="OrderFormNum" HeaderText="订单号" >
                            <HeaderStyle Width="15%" />
                          
                        </asp:HyperLinkField>
                         <asp:BoundField DataField="TradeType" HeaderText="类型" />
                        <asp:TemplateField HeaderText="商品">                            
                            <ItemTemplate>
                             <asp:HyperLink ID="SalerName" runat="server" Text='<%# Eval("ProductName") %>' NavigateUrl='<%#"../Auction/Auction.aspx?ProductID="+Eval("ProductID") %>'  Target="_blank"  ToolTip='<%# Eval("ProductName") %>'/> 
                            </ItemTemplate>
                            <HeaderStyle Width="17%"  />
                        </asp:TemplateField>                         
                        <asp:BoundField DataField="InputTime" DataFormatString="{0:yyyy-MM-dd}" HeaderText="订单时间" >
                            <HeaderStyle Width="10%" />
                        </asp:BoundField>
                        <asp:TemplateField HeaderText="联络卖家">                
                             <ItemTemplate>
                                 <asp:HyperLink ID="ConnectSaler" runat="server" Text='<%# Bind("SalerName") %>'  NavigateUrl='<%#"../Shop1/Shop_ShopIntro.aspx?UserID="+Eval("SalerID") %>'/>
                             </ItemTemplate>
                             <HeaderStyle Width="10%" />
                         </asp:TemplateField>     
                        <asp:BoundField DataField="MoneyTotal" HeaderText="订购金额" >
                            <HeaderStyle Width="7%"  />
                        </asp:BoundField>
                        <asp:BoundField DataField="MoneyReceipt" HeaderText="已收金额" >
                            <HeaderStyle Width="7%" />
                        </asp:BoundField>
                    
                       <asp:TemplateField HeaderText="订单状态">                            
                            <ItemTemplate> 
                               <asp:Literal ID="Status" runat="server" Text='<%# Eval("Status") %>' />
                            </ItemTemplate>
                            <HeaderStyle Width="7%"  />
                       </asp:TemplateField>    
                       
                         <asp:BoundField DataField="PayStatus" HeaderText="付款状态" >
                            <HeaderStyle Width="7%"  />
                        </asp:BoundField>
                        <asp:BoundField DataField="DeliverStatus" HeaderText="物流状态" >
                            <HeaderStyle Width="7%"  />
                        </asp:BoundField>
                       
                        <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>
                            <HeaderStyle Width="7%"  />
                        </asp:TemplateField>    
                      
                    </Columns>  
                    
                    <EmptyDataTemplate >                   
                          <div style="padding:10px;">没有符合查询条件的记录！</div>                                   
                    </EmptyDataTemplate>                
                </asp:GridView>        
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetOrderByManyCondition"
                    TypeName="Shop_Order"  DeleteMethod="DeleteOrder" UpdateMethod="GetOrderByManyCondition">
                    <SelectParameters>
                        <asp:SessionParameter DefaultValue="0" Name="UserIDSalerID" SessionField="Howave_UserID"
                            Type="Int32" />
                        <asp:ControlParameter ControlID="DropMoment" Name="Moment" PropertyName="SelectedValue"
                            Type="String" />
                        <asp:ControlParameter ControlID="TxtBeginDate" Name="BeginDate" PropertyName="Text"
                            Type="String" DefaultValue="2006-01-01" />
                        <asp:ControlParameter ControlID="TxtEndDate" Name="EndDate" PropertyName="Text" Type="String" DefaultValue="2101-01-01" />
                        <asp:Parameter DefaultValue="" Name="OrderFormNum" Type="String" />
                        <asp:ControlParameter ControlID="TxtBeginOrderID" Name="BeginOrderID" PropertyName="Text"
                            Type="Int32" DefaultValue="-1" />
                        <asp:ControlParameter ControlID="TxtEndOrderID" Name="EndOrderID" PropertyName="Text"
                            Type="Int32" DefaultValue="-1" />
                        <asp:ControlParameter ControlID="TxtBeginMoney" Name="BeginMoney" PropertyName="Text"
                            Type="Decimal" DefaultValue="-1" />
                        <asp:ControlParameter ControlID="TxtEndMoney" Name="EndMoney" PropertyName="Text"
                            Type="Decimal" DefaultValue="-1" />
                        <asp:ControlParameter ControlID="DroOrderStatic" DefaultValue="所有" Name="Status" PropertyName="SelectedValue" 
                            Type="String" />
                        <asp:ControlParameter ControlID="DroPayStatic" Name="PayStatic" PropertyName="SelectedValue"　DefaultValue="所有"
                            Type="String"   />
                        <asp:ControlParameter ControlID="DropDeliverStatus" Name="DeliverStatus" PropertyName="SelectedValue"
                            Type="String" DefaultValue="所有" />
                        <asp:Parameter DefaultValue="" Name="UserName" Type="String" />
                        <asp:Parameter DefaultValue="" Name="ContacterName" Type="String" />
                        <asp:Parameter DefaultValue="" Name="Email" Type="String" />
                        <asp:Parameter DefaultValue="" Name="Address" Type="String" />
                        <asp:Parameter DefaultValue="" Name="Phone" Type="String" />
                        <asp:Parameter DefaultValue="" Name="Mobile" Type="String" />
                        <asp:Parameter DefaultValue="" Name="Remark" Type="String" />
                        <asp:Parameter DefaultValue="" Name="ProductName" Type="String" />
                        <asp:Parameter DefaultValue="买进" Name="TransSize" Type="String" />
                    </SelectParameters>
                    <DeleteParameters>
                        <asp:Parameter Name="ArrayOrderFormNum" Type="String" />
                    </DeleteParameters>
                    <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>

