<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_Shop_SaleOrderView, WebApp_deploy" title="销售统计" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div class="pageTitle">
        &nbsp;&nbsp;<asp:Literal ID="ltrProType" runat="server"></asp:Literal>销售统计分析</div>
    <br />
    <asp:UpdatePanel ID="UpdatePanel4" runat="server">
        <ContentTemplate>
            <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="查询" OnClick="QuickSearchBtn_Click" />
                    </td>
                </tr>
            </table>
            <div style="line-height: 2px;">
                &nbsp;</div>
            <table class="SearchTableStyle">
                <tr>
                    <td>
                        你现在查看的是：<asp:DropDownList ID="DropMoment" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DropMoment_SelectedIndexChanged">
                            <asp:ListItem Value="0" Text="所有"></asp:ListItem>
                            <asp:ListItem Value="7" Text="一个星期之内"></asp:ListItem>
                            <asp:ListItem Value="10" Text="十天之内"></asp:ListItem>
                            <asp:ListItem Value="30" Text="一个月之内" Selected="True"></asp:ListItem>
                            <asp:ListItem Value="month" Text="本月"></asp:ListItem>
                            <asp:ListItem Value="year" Text="本年"></asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </table>
            <div style="line-height: 2px;">
                &nbsp;</div>
            <asp:Repeater ID="rptList" runat="server">
                <HeaderTemplate>
                    <table class="rptrow" cellspacing="0" cellpadding="0">
                        <tr>
                            <th>
                                行号
                            </th>
                            <th>
                                名称
                            </th>
                            <th>
                                销量
                            </th>
                            <th>
                                金额
                            </th>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr onmouseover="c=this.style.backgroundColor;this.style.backgroundColor='#E7EDFE'"
                        onmouseout="this.style.backgroundColor=c;">
                        <td align="center">
                            <asp:Label ID="lblRow" runat="server"></asp:Label>
                        </td>
                        <td align="left" style="padding-left: 6px; padding-right: 2px;">
                            <asp:HyperLink runat="server" Target="_blank" Text='<%#Eval("ProductName") %>' NavigateUrl='<%# "../ShowProduct.aspx?ProductID="+Eval("ProductID") %>'></asp:HyperLink>
                        </td>
                        <td align="right" style="padding-right: 6px;">
                            <%#Eval("TotalNum")%>
                        </td>
                        <td align="right" style="padding-right: 6px;">
                            <asp:HiddenField ID="hfCount" runat="server" Value='<%# Eval("TotalNum") %>' />
                            <asp:HiddenField ID="hfTotal" runat="server" Value='<%# Eval("Total") %>' />
                            <%# Eval("Total") %>
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <tr class="rptrowTrBg">
                        <td align="center">
                            合计
                        </td>
                        <td>
                            &nbsp;
                        </td>
                        <td align="right" style="padding-right: 6px;">
                            <asp:Label ID="lblTotalCount" runat="server" ForeColor="Black"></asp:Label>
                        </td>
                        <td align="right" style="padding-right: 6px;">
                            <asp:Label ID="lblTotalMoney" runat="server" ForeColor="Black"></asp:Label>
                        </td>
                    </tr>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
            <div style="text-align: center;">
                &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Literal ID="ltrPagePanel" runat="server"></asp:Literal></div>
            <div style="line-height: 6px;">
                &nbsp;</div>
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="TxtProductName"></asp:AsyncPostBackTrigger>
            <asp:AsyncPostBackTrigger ControlID="DropMoment"></asp:AsyncPostBackTrigger>
        </Triggers>
    </asp:UpdatePanel>
</asp:Content>
