<%@ page language="C#" masterpagefile="~/Shop/ShopMasterPage/MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_SaleOrderView, HoWaveVGO" title="销售统计" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"/>
<div class="pageTitle">销售统计分析</div>
<br />
    <table class="SearchTableStyle">      
        <tr>           
            <td class="tdbg5">商品名称：</td>
            <td class="tdbg5"><asp:TextBox ID="TxtProductName" 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 class="tdbg5"><asp:TextBox ID="TxtEndDate" runat="server" Height="16px"/></td>
            <td class="tdbg5"><asp:Button ID="QuickSearchBtn" runat="server" Text="查询" /></td>
        </tr>
    </table>
    <br />
    <table class="SearchTableStyle">
    <tr><td>
       你现在查看的是：<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" Width="120px">
                    <asp:ListItem Selected="True">所有</asp:ListItem>
                    <asp:ListItem>本周</asp:ListItem>
                    <asp:ListItem>十天</asp:ListItem>
                    <asp:ListItem>本月</asp:ListItem>
                    <asp:ListItem>本年</asp:ListItem>
                </asp:DropDownList>
    </td></tr>
    </table>
    <br />
    <asp:UpdatePanel ID="UpdatePanel4" runat="server" >
        <ContentTemplate>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" OnDataBound="GridView1_DataBound" 
            AllowPaging="True" AllowSorting="True" CssClass="tableHead">
                <Columns>
                    <asp:BoundField HeaderText="排名" >                     
                        <HeaderStyle Width="10%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="ProductName" HeaderText="商品名称" >
                        <HeaderStyle Width="40%" />
                    </asp:BoundField>                  
                    <asp:BoundField DataField="SumQuantity" HeaderText="销售数量" SortExpression="SumQuantity" >                    
                        <HeaderStyle Width="10%" />
                    </asp:BoundField>
                    <asp:BoundField DataField="SumMoneyGoods" HeaderText="销售金额" SortExpression="SumMoneyGoods" >                     
                        <HeaderStyle Width="15%" />
                    </asp:BoundField>
                </Columns>
                 <EmptyDataTemplate >                   
                      <div style="padding:10px;">没有符合查询条件的记录！</div>                                            
                    </EmptyDataTemplate> 
            </asp:GridView>
            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetSaleCount"
                TypeName="Shop_Order" OldValuesParameterFormatString="original_{0}">
                <SelectParameters>
                    <asp:SessionParameter DefaultValue="0" Name="SalerID" SessionField="Howave_UserID"   Type="Int32" />
                   
                    <asp:ControlParameter ControlID="TxtProductName" Name="ProductName" PropertyName="Text"
                        Type="String" />
                    <asp:ControlParameter ControlID="DropDownList1" Name="Monents" PropertyName="SelectedValue"
                        Type="String" DefaultValue="所有" />
                    <asp:ControlParameter ControlID="TxtBeginDate" DefaultValue="2007-01-01" Name="BeginDate"
                        PropertyName="Text" Type="String" />
                    <asp:ControlParameter ControlID="TxtEndDate" DefaultValue="2008-01-01" Name="EndDate"
                        PropertyName="Text" Type="String" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </ContentTemplate>
        <Triggers>
        <asp:AsyncPostBackTrigger ControlID="TxtProductName"  />
           <asp:AsyncPostBackTrigger ControlID="DropDownList1"  />
        </Triggers>
    </asp:UpdatePanel>
    <br />
    &nbsp;<br />
    <br />
</asp:Content>

