<%@ page language="C#" enableeventvalidation="false" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_ManageOrder, HoWaveVGO" title="订单列表" %>  
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
<div class="pageTitle">商家订单管理</div>
<br />
    <table class="SearchTableStyle">
        <tr>
            <td>付款状态：</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>
                <a onclick='PopCalendar.show(document.formSearch.EndDate, "yyyy-mm-dd", null, null, null, "11");'
                                style="cursor: hand"></a></td>
            <td>物流状态：</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>
            <td>订单状态：</td>
            <td><asp:DropDownList ID="DroOrderStatic" runat="server" AutoPostBack="True">
                    <asp:ListItem>领先</asp:ListItem>
                    <asp:ListItem>团购中</asp:ListItem>
                    <asp:ListItem>等待确认</asp:ListItem>
                    <asp:ListItem>已经确认</asp:ListItem>
                    <asp:ListItem>交易成功</asp:ListItem>
                    <asp:ListItem Selected="True">所有</asp:ListItem>
                </asp:DropDownList></td>
        </tr>
        <tr>
            <td>订单编号：</td>
            <td><asp:TextBox ID="TxtOrderNum" runat="server" Height="16px"/></td>
            <td>起始日期：</td>
            <td><asp:TextBox ID="TxtBeginDate" runat="server" Height="16px"/></td>
            <td>结束日期：</td>
            <td><asp:TextBox ID="TxtEndDate" runat="server" Height="16px"/></td>
            
        </tr>
        <tr>
            <td>买家名称：</td>
            <td><asp:TextBox ID="TxtCusName" runat="server" Height="16px"/></td>
            <td>金额从：</td>
            <td><asp:TextBox ID="TxtBeginMoney" runat="server" Height="16px"/></td>
            <td>至：</td>
            <td><asp:TextBox ID="TxtEndMoney" runat="server" Height="16px"/></td>
            
        </tr>
        <tr>
            <td>商品名称：</td>
            <td><asp:TextBox ID="TxtProductName" runat="server" Height="16px"/></td>    
            <td colspan="4">&nbsp;&nbsp;<asp:Button ID="QuickSearchButton" runat="server" Text="查询" /></td>
                   
        </tr>
        </table>
        <br />
        <table class="SearchTableStyle">
        <tr><td>
        你现在查看的是：<asp:DropDownList ID="DropMoment" runat="server"  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" EmptyDataText="对不起，没有找到符合你查询条件的订单" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" OnDataBound="GridView1_DataBound" ForeColor="Black" ShowFooter="True" AllowPaging="True" OnSelectedIndexChanged="GridView1_SelectedIndexChanged" DataKeyNames="OrderFormID" CssClass="tableHead">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:CheckBox ID="CheckBox1" runat="server" />
                            </ItemTemplate> 
                            <ItemStyle Width="20px" />                        
                        </asp:TemplateField>
                        <asp:HyperLinkField DataNavigateUrlFields="OrderFormNum" DataNavigateUrlFormatString="shop_buyorder.aspx?OrderFormNum={0}"
                            DataTextField="OrderFormNum" HeaderText="编号" >
                            <HeaderStyle Width="20%" />
                        </asp:HyperLinkField>
                        <asp:TemplateField HeaderText="买家">
                            
                            <ItemTemplate>
                                 <A HREF="../../Shop/Shop1/Shop_ShopIntro.aspx?UserID=<%# Eval("UserID") %>" target="_Blank"> <asp:Literal ID="SalerName" runat="server" Text='<%# Bind("UserName") %>'/> </a>
                            </ItemTemplate>
                            <HeaderStyle Width="10%" />
                        </asp:TemplateField>
                         
                        <asp:BoundField DataField="InputTime" DataFormatString="{0:yy-MM-dd}" HeaderText="时间" >
                            <HeaderStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="MoneyTotal" HeaderText="金额" >
                            <HeaderStyle Width="7%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="MoneyReceipt" HeaderText="已收金额" >
                            <HeaderStyle Width="10%" />
                        </asp:BoundField>                       
                        <asp:TemplateField HeaderText="状态">                            
                            <ItemTemplate>
                                 <asp:Literal ID="Status" runat="server" Text='<%# Bind("Status") %>'/>
                            </ItemTemplate>
                            <HeaderStyle Width="10%" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="DeliverStatus" HeaderText="物流状态" >
                            <HeaderStyle Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="付款状态"  DataField="PayStatus">
                            <HeaderStyle Width="10%" />
                        </asp:BoundField>
                          <asp:TemplateField HeaderText="操作"> 
                              <ItemTemplate>
                                  <asp:Label ID="CtrlOrder" runat="server"/>
                                  <asp:RadioButtonList ID="OnlinePayTypeSelect" runat="server" />
                                   <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="10%" />
              </asp:TemplateField> 
             
                  
                    </Columns>
                    <FooterStyle BackColor="#D3E7F6" BorderColor="#FFE0C0" ></FooterStyle>
                </asp:GridView> 
                <div style="clear:both; width:98%; text-align:center;">
                    <input type="button" value="全选" />
                    <input type="button" value="反选" />
                    <asp:Button ID="Button5" runat="server" OnClick="Button5_Click" Text="删除" />
                </div>
       
        <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetOrderByManyCondition"
            TypeName="Shop_Order" OldValuesParameterFormatString="original_{0}" UpdateMethod="GetOrderByManyCondition" DeleteMethod="DeleteOrder">
            <SelectParameters>
                <asp:SessionParameter DefaultValue="0" Name="UserIDSalerID" SessionField="Howave_UserID"
                    Type="Int32" />
                <asp:ControlParameter ControlID="DropMoment" Name="Moment" PropertyName="SelectedValue"
                    Type="String" DefaultValue="" />
                <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:ControlParameter ControlID="TxtOrderNum" Name="OrderFormNum" PropertyName="Text"
                    Type="String" DefaultValue="" />
                <asp:Parameter  Name="BeginOrderID"  Type="Int32" DefaultValue="-1" />
                <asp:Parameter  Name="EndOrderID"   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:ControlParameter ControlID="TxtCusName" Name="UserName" PropertyName="Text"　DefaultValue=""
                    Type="String"　 />
                <asp:Parameter Name="ContacterName" DefaultValue=""  Type="String" />
                <asp:Parameter  Name="Email" 　DefaultValue=""  Type="String" />
                <asp:Parameter  Name="Address" DefaultValue=""  Type="String" />
                <asp:Parameter  Name="Phone"　DefaultValue=""   Type="String" />
                <asp:Parameter  Name="Mobile" DefaultValue=""   Type="String" />
                <asp:Parameter  Name="Remark" Type="String" DefaultValue="" />
                <asp:ControlParameter ControlID="TxtProductName" Name="ProductName" PropertyName="Text"
                    Type="String" DefaultValue="" />
                <asp:Parameter DefaultValue="卖出" Name="TransSize" 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>
            <DeleteParameters>
                <asp:Parameter Name="OrderIDArray" Type="String" />
            </DeleteParameters>
        </asp:ObjectDataSource> 
             
                  
         
</asp:Content>

