<%@ page language="C#" masterpagefile="~/MasterPage/UserMasterPage.master" autoeventwireup="true" inherits="Rest_statistics_UserRegisterSales, DoodiiShop" title="Untitled Page" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <style type="text/css">@import url(/js/jquery-calendar/jquery-calendar.css);</style>

    <script type="text/javascript" src="/js/jquery-calendar/jquery-calendar.js"></script>

    <style type="text/css">
.STYLE1 {color: #ff0048}
a.select:link, a.select:visited, a.select:hover{ display:block; width:75px;height:27px;
 background-image :url(/images/KcDefault/KcDefault_Search_btn02.gif);font-weight:bold;color:#982e00;}
.title ul li{float:left; width:75px; height:27px; line-height:27px; text-align:center;}
.title ul li a{color:#000000; }
.dd{float:left; width:800px; height:27px; margin-top:8px; margin-bottom:10px; }
.dg{float:left; width:75px; height:27px; background-image :url(/images/KcDefault/KcDefault_Search_btn01.gif); line-height:27px; margin-right:5px;}
.title ul{ float:left; width:660px; line-height:29px; background: url(/images/KcDefault/KcDefault_Search_bg.gif) repeat-x;}
.gg{float:left; width:76px; height:26px; line-height:26px; text-align:center;color:#000000; background-image :url(/images/v6top/msg.jpg); margin-right:8px}
.yy{float:left; width:650px; height:23px;}
.sui{ width:48px; background-color:green;color:#FFFFFF; margin-right:192px;
 height:25px; line-height:25px;  text-align:center;}
.cui{float:left; background-color:#008c00; color:#FFFFFF; width:72px;  height:25px; line-height:25px; text-align:center; margin-right:8px; cursor:pointer;}
</style>

    <script type="text/javascript">

        function init()
        {
            $("#<%=tbStartDate.ClientID %>").calendar(); 
            $("#<%=tbEndDate.ClientID %>").calendar(); 
        }
        $(document).ready(function()
            {init();
        });
    </script>

    <div id="divDemo" runat="server" style="color: red; font-size: 24px; margin: 0px;
        padding: 0px;">
        <strong>如果您需要申请试用或购买本模块请<a href='http://www.doulaiding.com/buy/' target="_blank">联系我们</a>！</strong><br />
    </div>
    <div id="divContent" runat="server">
        <asp:HiddenField ID="hidType" runat="server" Value="0" />
        <div class="title">
            <ul>
                <li class="dg">
                    <asp:LinkButton ID="lbtDay" CssClass="select" runat="server" OnClick="lbtDay_Click">当日排行</asp:LinkButton></li><li
                        class="dg">
                        <asp:LinkButton ID="lbtMonth" runat="server" OnClick="lbtMonth_Click">当月排行</asp:LinkButton></li><li
                            class="dg">
                            <asp:LinkButton ID="lbtAll" runat="server" OnClick="lbtAll_Click">总排行</asp:LinkButton>
                        </li>
                <li class="dg">
                    <asp:LinkButton ID="lbtDefined" runat="server" OnClick="lbtDefined_Click">自定义时间</asp:LinkButton>
                </li>
            </ul>
        </div>
        <div style="float:left; width:630px; margin-top:10px; margin-top:0px\9;  padding:10px; border:1px #cccccc solid;">
        <table class="tablebaobiao" border="0" cellspacing="0" cellpadding="0">
           <tr><td  valign="middle">
            <div id="divTime" runat="server" style="float:left; padding-bottom:8px; clear:both;">
                排行时间：<span style="color:#FF0000;"><asp:Label ID="lblTime" runat="server" Text=""></asp:Label></span></div>
            <div id="divSelectTime" runat="server" visible="false" style="float:left; padding-bottom:8px; clear:both;">
                查询时间：<span style="padding:0px 5px 0px 0px;">从</span><asp:TextBox ID="tbStartDate" runat="server"></asp:TextBox>
                <span style="padding:0px 5px;">至</span><asp:TextBox ID="tbEndDate" runat="server"></asp:TextBox></div>
            <div style="float:left; padding-bottom:8px; clear:both;">
                订单状态：<select id="ddlState" runat="server">
                    <option value="-3">全部</option>
                    <option value="1" selected="selected">已完成</option>
                    <option value="0">待处理</option>
                    <option value="-1">作废</option>
                    <option value="-2">虚假</option>
                </select>&nbsp;&nbsp;<asp:Button ID="Button1" runat="server" Text="查询" OnClick="Button1_Click" /></div>
            
            </td></tr></table>
        </div>
        <div class="tablezongji">
            <div style="float:left;">订单总笔数：<span id="lblTotalCount" runat="server" style="color:#FF0000;">112笔</span> 订单总金额：<span id="lblTotal"
                runat="server" style="color:#FF0000;">5436元</span></div><div style="float:right;"><asp:Button ID="Button2" runat="server" Text="导出到EXCEL"
                    OnClick="Button2_Click" /></div>
        </div>
        <div style="margin-top:10px; float:left;">
        <asp:HiddenField ID="hidOrderByName" runat="server" Value=" sum(total)" />
        <asp:HiddenField ID="hidOrderByMark" runat="server" Value=" desc" />
        <asp:Repeater runat="server" ID="Repeater1">
            <HeaderTemplate>
                <table class="NewTable NewTable1">
                    <tr>
                        <th>
                            编号</th>
                        <th>
                            用户名</th>
                        <th>
                            <asp:LinkButton ID="lbtTotalCount" runat="server" OnClick="OrderByTotalCount">订单笔数（笔）<%=getPoint(0) %></asp:LinkButton></th>
                        <th>
                            <asp:LinkButton ID="lbtTotal" runat="server" OnClick="OrderByTotal">订单金额（元）<%=getPoint(1) %></asp:LinkButton></th>
                        <th>
                            <asp:LinkButton ID="lbtAve" runat="server" OnClick="OrderByAve">订单均额（元）<%=getPoint(2) %></asp:LinkButton></th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr>
                    <td>
                        <%#Eval("row") %>
                    </td>
                    <td>
                        <%#Eval("email") %>
                    </td>
                    <td>
                        <%#Eval("totalcount") %>
                    </td>
                    <td>
                        <%#Convert.ToSingle(Eval("total")).ToString("0.00") %>
                    </td>
                    <td>
                        <%#Eval("ave") %>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        </div>
        <div style="width: 243px; float: left; margin-top:8px;">
            <PageControl:myPageControl ID="MyPageControl1" runat="server" PageSize="50" TotalRecord="20"
                OnChangePageClick="PageControl_Click" IsDoPostBack="true" ItemSize="5" PageInfoShow="False" />
        </div>
    </div>
</asp:Content>
