<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopSaleOrderView, HoWaveVGO" title="销售统计" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<table class="adminheading">
   <tr>
      <th valign="middle" class="menus" align="left">销售管理</th>
      <td align="right">
      <div style="width:400px">
            <a href="Admin_ShopSaleView.aspx" >销售明细</a>&nbsp;|&nbsp;
            <a href="Admin_ShopSaleOrderView.aspx">销售统计</a>&nbsp;|&nbsp;
            <a href="Admin_ShopBankrollItemView.aspx">资金明细</a>&nbsp;<br />                
      </div>
      </td>
      <td class="rtdw"></td>          
   </tr>                     
</table>

    <table class="nick">
        <tr>
            <td colspan="4" class="tit"><b>销售统计列表</b></td>
        </tr>
        <tr>
            <td class="ltd">卖家名称</td>
            <td class="rtd" style="width: 35%;"><asp:TextBox ID="TextBox1" runat="server" AutoPostBack="True"/></td>
            <td class="ltd">卖家列表</td>
            <td class="rtd" style="width: 35%;">
               <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="ObjectDataSource2"
                    DataTextField="username" DataValueField="userid" AppendDataBoundItems="True">
                    <asp:ListItem Value="-1">所有</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td class="ltd">
                时间段</td>
            <td class="rtd" style="width: 35%;">
                <asp:DropDownList ID="DropDownList11" runat="server" AutoPostBack="True">
                    <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>
            <td class="ltd">
                商品名称</td>
            <td class="rtd" style="width: 35%;">
                <asp:TextBox ID="TxtProductName" runat="server"  AutoPostBack="True"/></td>
        </tr>
        <tr>
            <td class="ltd">起始日期</td>
            <td class="rtd" style="width: 35%;"><asp:TextBox ID="TxtBeginDate" runat="server" AutoPostBack="True" /></td>
            <td class="ltd">结束日期</td>
            <td class="rtd" style="width: 35%;"><asp:TextBox ID="TxtEndDate" runat="server" AutoPostBack="True" /></td>
        </tr>
    </table>
    <br />
           
    <asp:GridView ID="GridView1" CssClass="adminlist" runat="server" AutoGenerateColumns="False" DataSourceID="ObjectDataSource1" OnRowDataBound="GridView1_RowDataBound" OnDataBound="GridView1_DataBound" RowStyle-HorizontalAlign="Center" AllowPaging="True" AllowSorting="True" ShowFooter="True">
        <Columns>
            <asp:BoundField HeaderText="名次" >                      
                <HeaderStyle Width="10%" />
            </asp:BoundField>
            <asp:BoundField DataField="ProductName" HeaderText="商品名称" >
                <HeaderStyle Width="50%" />
            </asp:BoundField>
            <asp:BoundField DataField="Punit" HeaderText="单位" >                      
                <HeaderStyle Width="10%" />
            </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>
                <tr>
                    <th>名次</th>
                    <th>商品名称</th>
                    <th>单位</th>
                    <th>销售数量</th>
                    <th>销售金额</th>                   
                </tr>
                <tr><td colspan="5">暂无信息！</td></tr>
        </EmptyDataTemplate>
    </asp:GridView>



 <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetUserLikeUserName"   TypeName="UserBLL">
    <SelectParameters>
        <asp:ControlParameter ControlID="TextBox1" Name="UserName" PropertyName="Text" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>

 <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetSaleCount"
                TypeName="Shop_Order" OldValuesParameterFormatString="original_{0}">
    <SelectParameters>
        <asp:ControlParameter ControlID="DropDownList1" DefaultValue="-1" Name="SalerID"
            PropertyName="SelectedValue" 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="2006-01-01" Name="BeginDate"
            PropertyName="Text" Type="String" />
        <asp:ControlParameter ControlID="TxtEndDate" DefaultValue="2500-01-01" Name="EndDate"
            PropertyName="Text" Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
</asp:Content>

