<%@ page language="C#" masterpagefile="~/MasterPage/UserMasterPage.master" autoeventwireup="true" inherits="Rest_statistics_IssuedOrdersTimeStatis, 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>

    <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">
        <div style="float:left; width:630px; padding:10px; border:1px #cccccc solid;">
        <table class="tablebaobiao" border="0" cellspacing="0" cellpadding="0">
           <tr><td  valign="middle">
            地区选择：<asp:DropDownList ID="ddlProvince" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlProvince_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="ddlCity" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlCity_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="ddlRegion" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddlRegion_SelectedIndexChanged">
            </asp:DropDownList>
            <asp:DropDownList ID="ddlZone" runat="server">
            </asp:DropDownList>
            </td></tr>
            <tr><td  valign="middle">
            查询时间：<span style="padding:0px 5px;">从</span><asp:TextBox ID="tbStartDate" runat="server" BorderStyle="Groove" Width="90px"></asp:TextBox>
            <span style="padding:0px 5px;">到</span><asp:TextBox ID="tbEndDate" runat="server" BorderStyle="Groove" Width="90px"></asp:TextBox>
            </td></tr>
            <tr><td  valign="middle">
            订单状态：<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>
            <asp:Button ID="BTStatis" runat="server" OnClick="BTStatis_Click" Text="查询 " Width="50px" />
            </td></tr></table>
        </div>
        <div class="tablezongji">
            <div style="float:left;">订单总笔数：<asp:Label ID="Mess" runat="server"  style="color:#FF0000;"></asp:Label>
            消费总金额：<asp:Label ID="MMess" runat="server"  style="color:#FF0000;"></asp:Label></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; border-top:1px #cccccc solid; border-left:1px #cccccc solid; ">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" Height="1px"
                 OnPreRender="GridView1_PreRender" CssClass="NewTable NewTable1" AllowSorting="True"
                OnSorting="GridView1_Sorting">
                <Columns>
                    <asp:TemplateField HeaderText="编号" InsertVisible="False">
                        <ItemStyle HorizontalAlign="Center" />
                        <HeaderStyle HorizontalAlign="Center" Width="10%" />
                        <ItemTemplate>
                            <%#Container.DataItemIndex+1%>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="datestr" HeaderText="下单时间">
                        <HeaderStyle HorizontalAlign="Center" Width="20%" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="OrderCount" HeaderText="订单笔数（笔）" SortExpression="OrderCount">
                        <HeaderStyle HorizontalAlign="Center" Width="15%" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField DataField="OrderMoney" HeaderText="订单金额（元）" SortExpression="OrderMoney">
                        <HeaderStyle HorizontalAlign="Center" Width="15%" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="订单均额（元）">
                        <HeaderStyle HorizontalAlign="Center" Width="15%" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                    <asp:BoundField HeaderText="占本区总金额%">
                        <HeaderStyle HorizontalAlign="Center" Width="25%" />
                        <ItemStyle HorizontalAlign="Center" />
                    </asp:BoundField>
                </Columns>
                <AlternatingRowStyle BackColor="#F6F6F6" />
            </asp:GridView>
        </div>

        <script language="javascript" type="text/javascript">
var loadPage = function() 
{
 $("#<%=tbStartDate.ClientID %>").calendar();
 $("#<%=tbEndDate.ClientID %>").calendar();  
}
$(document).ready( function(){ loadPage() });
        </script>

    </div>
</asp:Content>
