<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.Report_MemberCount_Count, V5Shop.Shop.Others" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc1" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register TagPrefix="V5Shop" Namespace="V5Shop.Control" Assembly="V5Shop.Control" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <link href="css/css.css" rel="stylesheet" type="text/css" />
    <link href="css/control.css" rel="stylesheet" type="text/css" />
    <link href="js/calendar-system.css" rel="stylesheet" type="text/css" />
    <link href="css/css_list.css" rel="stylesheet" type="text/css" />

    <script type="text/javascript" language="javascript" src="js/Common.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>

    <script type="text/javascript" language="javascript" src="Js/Calendar-Setup.js"></script>

</head>
<body>
    <form id="form1" runat="server">
        <div class="OperateTitle">
            <div>
                <asp:Label ID="lblAdd" runat="server" Text="【 会员统计 】"></asp:Label>
            </div>
        </div>
                <div id="Div1">
            <table width="100%" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="center" colspan="4" style="height: 25px">
                        <asp:Label ID="lblReport" runat="server" Font-Bold="True" ForeColor="Black" Text="会员订单销售统计"></asp:Label>
                    </td>
                </tr>
            </table>
        </div>
        <div id="search" runat="server">
            <table width="100%" align="center" cellpadding="0" cellspacing="0" id="OperateTable">
                <tr id="Tr2" runat="server" class="FFtr">
                  <td align="right" style="width: 20%; height: 30px">
                        <asp:Label ID="lblUserGroup" runat="server" Text="会员等级："></asp:Label></td>
                    <td align="left" style="width: 248px;">
                        <asp:DropDownList ID="ddlUserGroup" runat="server">                        </asp:DropDownList></td>
                    <td align="right" style="width: 153px;">
                        <asp:Label ID="lblUserSex" runat="server" Text="会员性别："></asp:Label></td>
                    <td align="left" style="">
                        <asp:DropDownList ID="ddlUserSex" runat="server">                        </asp:DropDownList></td>
                </tr>
                <tr class="F7tr">
                    <td align="right" style="width: 20%; height: 30px">
                        <asp:Label ID="Label2" runat="server" Text="注册时间："></asp:Label></td>
                    <td align="left" colspan="3">
                        <asp:TextBox ID="txtStartDate" runat="server" Width="90px"></asp:TextBox>
                        <img id="sltStart" src="images/calendar1.gif" title="打开日历" alt="打开日历" align="absmiddle" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="txtStartDate"
                            runat="server" ErrorMessage="日期格式不正确" ValidationExpression="^\d{4}-\d{2}-\d{2}$"
                            Display="Dynamic"></asp:RegularExpressionValidator>-<asp:TextBox ID="txtEndDate"
                                runat="server" Width="90px"></asp:TextBox>
                        <img id="sltEnd" src="images/calendar1.gif" title="打开日历" alt="打开日历" align="absmiddle" />
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" ControlToValidate="txtEndDate"
                            runat="server" ErrorMessage="日期格式不正确" ValidationExpression="^\d{4}-\d{2}-\d{2}$"
                            Display="Dynamic"></asp:RegularExpressionValidator>                    </td>
                </tr>
                <tr class="FFtr">
                    <td align="right" style="width: 20%; height: 30px">                    </td>
                    <td align="left" colspan="3">
                        <asp:Button ID="btnConfirm" runat="server" CssClass="button" Text="统计" OnClick="btnConfirm_Click" />
                        <asp:Button ID="btnCountSummary" runat="server" CausesValidation="False" CssClass="button"
                            OnClick="btnCountSummary_Click" Text="统计概况" /></td>
                </tr>
            </table>

            <script type="text/javascript">
            //加TABLE样式
            //InitTrClass();
        Calendar.setup({
	        inputField     :    "txtStartDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "sltStart",
	        align          :    "Br",
	        singleClick    :    true
        });
        Calendar.setup({
	        inputField     :    "txtEndDate",
	        ifFormat       :    "%Y-%m-%d", 
	        button         :    "sltEnd",
	        align          :    "Br",
	        singleClick    :    true
        });
            </script>

        </div>
        <div id="Result" runat="server" visible="false" class="listborder">
            <div id="header" style=" line-height:30px; border-bottom:1px #CCCCCC solid; background:#f7f7f7">
                　
                  <b><asp:Label ID="lblUserGroupIDInfo" runat="server" Text="会员等级："></asp:Label><b>
                <font color="#003366"><asp:Label ID="lblUserGroupID" runat="server" Text=""></asp:Label></font>
                　
                <b><asp:Label ID="lblUserSexInfo" runat="server" Text="会员性别："></asp:Label></b>
                <font color="#003366"><asp:Label ID="lblSex" runat="server" Text=""></asp:Label><font>
            </div>
            <div style="padding: 3px 25px; color: #4B6888; border-bottom: 1px #CCCCCC solid"
                runat="server" id="middle1">
                <input type="checkbox" id="CheckAllBox" onclick="CheckAll()" class="checkbox" />
                全选
        　    <asp:LinkButton ID="btnExPort" runat="server" ForeColor="#4B6888" OnClientClick="return CheckSelect()"
                    OnClick="btnExPort_Click"><img src="images/icon/key_save.gif" /> 保存到Excel</asp:LinkButton>
        　    <asp:LinkButton ID="btnReCount" runat="server" ForeColor="#4B6888" OnClick="btnReCount_Click"><img src="images/icon/key_count.gif" /> 重新统计</asp:LinkButton>
            </div>
            
            <div class="listborder">

                    <V5Shop:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True"
                        AutoGenerateColumns="False" CssClass="datalist" HeaderStyle-Height="18px" HeaderStyle-ForeColor="#000"
                        EmptyDataText="没有查询到任何记录" TableName="User" CacheName="User" PageSize="9999999"
                        BorderWidth="0px" GridLines="None" PagerSettings-Visible="false">
                        <Columns>
                            <asp:TemplateField>
                                <itemstyle width="3%" />
                                <itemtemplate>
                                <input runat="server" Value='<%# Eval("ID") %>' ID="CheckBoxID" type="checkbox" onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" mouse="out" class="checkbox"/>
						    </itemtemplate>
                                <itemstyle horizontalalign="Center" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="id" SortExpression="ID" HeaderText="ID">
                                <itemstyle width="6%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="AreaName" SortExpression="AreaName" HeaderText="地区名称" />
                            <asp:BoundField DataField="TotalCount" SortExpression="TotalCount" HeaderText="会员总数" />
                            <asp:BoundField DataField="UserPercent" SortExpression="UserPercent" HeaderText="百分比" />
                        </Columns>
                        <PagerSettings Mode="NumericFirstLast" />
                        <HeaderStyle CssClass="category" ForeColor="Black" Height="18px" />
                    </V5Shop:V5ShopGridView>
           
            </div>
        </div>
        <div id="middle2" runat="server" visible="false" align="center">
            <asp:Button ID="btnExportTrue" runat="server" Text="立即保存" CssClass="button" OnClick="btnExportTrue_Click" />
        </div>
        <div id="middle" runat="server" visible="false" align="center" class="listborder">
            <V5Shop:V5ShopGridView ID="V5ShopGridView1" runat="server" AllowPaging="True" AllowSorting="True"
                AutoGenerateColumns="False" CssClass="datalist" HeaderStyle-Height="28px" HeaderStyle-ForeColor="#000"
                EmptyDataText="没有查询到任何记录" TableName="User" CacheName="User" PageSize="9999999"
                BorderWidth="0px" GridLines="None" PagerSettings-Visible="false">
                <Columns>
                        <asp:BoundField DataField="id" HeaderText="ID">
                            <itemstyle width="6%" />
                        </asp:BoundField>
                        <asp:BoundField DataField="AreaName"  HeaderText="地区名称" />
                        <asp:BoundField DataField="TotalCount" HeaderText="会员总数" />
                        <asp:BoundField DataField="UserPercent" HeaderText="百分比" />
                </Columns>
                <PagerSettings Mode="NumericFirstLast" Visible="False" />
                <HeaderStyle CssClass="category" ForeColor="Black" Height="18px" />
            </V5Shop:V5ShopGridView>
        </div>

        <div id="bottom" runat="server" align="right" visible="false">
            <table width="100%" align="center" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="right" colspan="4" style="height: 25px">
                        <asp:Label ID="lblTotalCountInfo" runat="server" Text="会员总数："></asp:Label>
                        <asp:Label ID="lblTotalCount" runat="server"></asp:Label>
                    </td>
                </tr>
            </table>
        </div>
        <div id="hiddenfield">
            <asp:HiddenField ID="CheckedIDS" runat="server" Value="0" />
            <asp:HiddenField ID="PageIndex" runat="server" Value="0" />
            <asp:HiddenField ID="MaxPageIndex" runat="server" Value="0" />
            <uc1:HiddenField ID="Alert" runat="server" />
            <asp:HiddenField ID="hfTableContent" runat="server" />
        </div>

        <script type="text/javascript">
        function GetContent()
        {
            try
            {
                document.getElementById("hfTableContent").value=document.getElementById("Div1").innerHTML + document.getElementById("header").innerHTML + document.getElementById("middle").innerHTML+document.getElementById("bottom").innerHTML;
            }
            catch(e){}
        }
        <% =jsstr%>
        </script>

        <uc1:PageBottom ID="PageBottom1" runat="server" />
    </form>
</body>
</html>
