<%
    //-----------------------------------------------------------
    // 文件名称: User_User_Manage.aspx
    // 页面名称: 会员管理
    //
    // 描    述:
    //
    // 创建标识: Add By 吴建春 2008-06-05
    //-----------------------------------------------------------
%>

<%@ page language="C#" autoeventwireup="true" inherits="V5Shop.Admin.User_User_Manage, V5Shop.Shop.User" culture="auto" uiculture="auto" meta:resourcekey="PageResource1" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<%@ Register Assembly="V5Shop.Control" Namespace="V5Shop.Control" TagPrefix="cc1" %>
<%@ Register Src="control/HiddenField.ascx" TagName="HiddenField" TagPrefix="uc1" %>
<%@ Register Src="control/PageBottom.ascx" TagName="PageBottom" TagPrefix="uc2" %>
<%@ Register Src="control/ManageHeader.ascx" TagName="ManageHeader" TagPrefix="uc3" %>
<!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 runat="server">
    <title></title>
    <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-Setup.js"></script>
    <script type="text/javascript" language="javascript" src="Js/Calendar-zh.js"></script>
</head>
<body>
    <form id="form1" runat="server">
        <div>
            <uc3:ManageHeader ID="PageHead" runat="server" />
            <div id="search">
                <!-- 查询部 -->
                <div style="padding: 10px 20px; border: 1px #eeeeee solid; background: #f7f7f7; margin: 0 0 5px 0;">
                    <table width="100%">
                        <tr>
                            <td width="80%">
                            
                            <div> 
                    <asp:Label ID="lblAdminName" runat="server" meta:resourcekey="lblAdminNameResource" Text="会 员 名:"></asp:Label>
                    <asp:TextBox ID="txtName" runat="server" Width="120px"></asp:TextBox>
                    <asp:Label ID="Label5" runat="server" meta:resourcekey="lblAdminNameResource" Text="性 别:"></asp:Label>
                    <asp:DropDownList ID="ddlSex" runat="server" Width="54px">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="0">保密</asp:ListItem>
                        <asp:ListItem Value="1">男</asp:ListItem>
                        <asp:ListItem Value="2">女</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label8" runat="server" meta:resourcekey="lblAdminNameResource" Text="会员等级:"></asp:Label>
                    <asp:DropDownList ID="ddlGroupName" runat="server" Width="104px">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">已审核</asp:ListItem>
                        <asp:ListItem Value="0">未审核</asp:ListItem>
                    </asp:DropDownList>
                    <asp:Label ID="Label1" runat="server" meta:resourcekey="lblAdminNameResource" Text="锁定状态:"></asp:Label>
                    <asp:DropDownList ID="ddlIsLock" runat="server" Width="54px">
                        <asp:ListItem Value="-1">全部</asp:ListItem>
                        <asp:ListItem Value="1">已锁定</asp:ListItem>
                        <asp:ListItem Value="0">未锁定</asp:ListItem>
                    </asp:DropDownList>
                    </div>
                    
                    <div id="searchmore" style="display: none;">
                    <asp:Label ID="Label2" runat="server" meta:resourcekey="lblAdminNameResource" Text="信用额度:"></asp:Label>
                    <asp:TextBox ID="txtCreditMin" runat="server" Width="84px" /><asp:RegularExpressionValidator ID="revCreditMin" runat="server" ControlToValidate="txtCreditMin" ErrorMessage="请输入数字" ValidationExpression="^(-?\d+)(\.\d+)?$" Display="Dynamic"></asp:RegularExpressionValidator>
                    -
                    <asp:TextBox ID="txtCreditMax" runat="server" Width="84px" /><asp:RegularExpressionValidator ID="revCreditMax" runat="server" ControlToValidate="txtCreditMax" ErrorMessage="请输入数字" ValidationExpression="^(-?\d+)(\.\d+)?$" Display="Dynamic"></asp:RegularExpressionValidator>
                    <asp:Label ID="Label3" runat="server" meta:resourcekey="lblAdminNameResource" Text="积&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;分:"></asp:Label>
                    <asp:TextBox ID="txtScoreMin" runat="server" Width="84px"></asp:TextBox><asp:RegularExpressionValidator ID="revScoreMin" runat="server" ControlToValidate="txtScoreMin" ErrorMessage="请输入数字" ValidationExpression="^(-?\d+)(\.\d+)?$" Display="Dynamic"></asp:RegularExpressionValidator>
                    -
                    <asp:TextBox ID="txtScoreMax" runat="server" Width="84px"></asp:TextBox><asp:RegularExpressionValidator ID="revScoreMax" runat="server" ControlToValidate="txtScoreMax" ErrorMessage="请输入数字" ValidationExpression="^(-?\d+)(\.\d+)?$" Display="Dynamic"></asp:RegularExpressionValidator><br>
                    <asp:Label ID="Label4" runat="server" meta:resourcekey="lblAdminNameResource" Text="所在城市:"></asp:Label>
                    <asp:TextBox ID="txtAreaName" runat="server" Width="120px"></asp:TextBox>
                    <asp:Label ID="Label7" runat="server" meta:resourcekey="lblAdminNameResource" Text="注册日期:"></asp:Label>
                    <asp:TextBox ID="txtRegDateStart" runat="server" Width="120px" onblur="return CheckDate(this, true, false);" /> <img id="ImgDateStart" alt="打开日历" src="images/calendar1.gif" title="打开日历" />
                    -
                    <asp:TextBox ID="txtRegDateEnd" runat="server" Width="120px" onblur="return CheckDate(this, true, false);" /> <img id="ImgDateEnd" alt="打开日历" src="images/calendar1.gif" title="打开日历" />&nbsp;
                    </div>
                    </td>
                    <td width="45%" align="left">
                    <a href="javascript:void(0);" onclick="HiddenOrShowSearch()">
                                    <img id="searchimg" src="images/more.gif" align="absmiddle" />
                                    <span id="searchwd">更多</span></a> <span>
                        <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="查询" meta:resourcekey="btnSearchResource" CssClass="button" /><!-- 查询按钮 --></div>
                        </span>
                    </td>
                   </tr>
                  </table>
            </div>
            <div id="content">
                <div style="padding-right: 25px; padding-left: 25px; padding-bottom: 3px; color: #4b6888; padding-top: 3px; border-bottom: #cccccc 1px solid">
                <table width="100%">
                        <tr>
                            <td width="10%">
                    <input id="CheckAllBox" onclick="CheckAll()" type="checkbox" class="checkbox" />
                    全选 &nbsp;&nbsp;
                    </td>
                    <td>
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="#4B6888" meta:resourcekey="btnAddResource2" OnClick="btnAdd_Click"><img src="images/icon/key_add.gif" alt="添加"/> 添加</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnEdit" runat="server" ForeColor="#4B6888" meta:resourcekey="btnEditResource2" OnClick="btnEdit_Click" OnClientClick="return CheckEdit()" CausesValidation="False"><img src="images/icon/key_edit.gif" alt="编辑"/> 编辑</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnDelStatus" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnDelStatus_Click" OnClientClick="return CheckDel()"><img src="images/icon/key_delete.gif" alt="删除"/> 删除</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnLockUser" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelect()" OnClick="btnLockUser_Click"><img src="images/icon/key_lock.gif" alt="锁定用户"/> 锁定用户</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnUnLock" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelect()" OnClick="btnLockUser_Click"><img src="images/icon/key_unlock.gif" alt="取消锁定"/> 取消锁定</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnLockScore" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelectOne()" OnClick="btnLockScore_Click"><img src="images/icon/key_lock.gif" alt="冻结资金/积分"/> 冻结资金/积分</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnScoreOperate" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelectOne()" OnClick="btnScoreOperate_Click"><img src="images/icon/key_edit2.gif" alt="积分操作"/> 积分操作</asp:LinkButton><br />
                    
                    <asp:LinkButton ID="btnLookAddress" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelectOne()" OnClick="btnLookAddress_Click"><img src="images/icon/key_detail.gif" alt="查看收货地址"/> 查看收货地址</asp:LinkButton> 
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnViewOrder" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelectOne()" OnClick="btnViewOrder_Click"><img src="images/icon/key_detail.gif" alt="查看订单"/> 查看订单</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnSetUserCard" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelectOne()" OnClick="btnSetUserCard_Click"><img src="images/icon/key_usercard.gif" alt="分配会员卡"/> 分配会员卡</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnSetCard" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelectOne()" OnClick="btnSetCard_Click"><img src="images/icon/key_moneycard.gif" alt="分配充值卡"/> 分配充值卡</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnSetShopCard" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClientClick="return CheckSelectOne()" OnClick="btnSetShopCard_Click"><img src="images/icon/key_shopcard.gif" alt="分配购物卡"/> 分配购物卡</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnSetCoupon" runat="server" CausesValidation="False" ForeColor="#4B6888" meta:resourcekey="btnDelResource2" OnClick="btnSetCoupon_Click" OnClientClick="return CheckSelectOne()"><img src="images/icon/key_coupon.gif" alt="分配优惠券"/> 分配优惠券</asp:LinkButton>
                    </td>
                    </tr>
                    </table>
                    
                    </div>
                    
                <!-- 明细数据 -->
                <div class="listborder">
                    <cc1:V5ShopGridView ID="GridViewShow" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" CssClass="datalist" PageSize="15" HeaderStyle-ForeColor="#000000" EmptyDataText="没有任何可用信息！" Width="100%">
                        <PagerSettings Mode="NumericFirstLast" />
                        <Columns>
                            <asp:TemplateField meta:resourcekey="DetilData">
                                <itemtemplate>
                                <input runat="server" value='<%# Eval("ID") %>' id="CheckBoxID" type="checkbox" class="checkbox"
                                    onmouseover="this.mouse='over'" onmouseout="this.mouse='out'" />
                                
</itemtemplate>
                                <itemstyle horizontalalign="Center" width="2%" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="ID" HeaderText="ID" SortExpression="ID" Visible="false">
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="会员名" SortExpression="Name">
                            <itemstyle width="8%" />
                                 <itemtemplate>
                                    <span style="font-size:11px;"><%# Eval("Name") %></span>
                                 </itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="GroupName" HeaderText="会员等级" SortExpression="GroupName" >
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="性别" SortExpression="Sex">
                                <itemtemplate>
                                    <asp:Label ID="lblSexState" runat="server" Text='<%# FormatSexState(DataBinder.Eval(Container, "DataItem(Sex)","{0}")) %>'></asp:Label>
                            
</itemtemplate>
                                <itemstyle width="3%" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="城市" SortExpression="AreaName">
                            <itemstyle width="6%" />
                                 <itemtemplate>
                                    <span style="font-size:11px;"><%# Eval("AreaName")%></span>
                                 </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Email" SortExpression="Email">
                            <itemstyle width="10%" />
                                 <itemtemplate>
                                    <span style="font-size:11px;"><%# Eval("Email") %></span>
                                 </itemtemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="Score" HeaderText="积分" SortExpression="Score" >
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="CardPrise" HeaderText="卡内余额" SortExpression="CardPrise" >
                                <itemstyle width="5%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Credit" HeaderText="信用额度" SortExpression="Credit" Visible="false">
                                <itemstyle width="9%" />
                            </asp:BoundField>
                            <asp:BoundField DataField="LoginTimes" HeaderText="登录" SortExpression="LoginTimes" >
                                <itemstyle width="3%" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="注册日期" SortExpression="RegDate">
                            <itemstyle width="6%" />
                                 <itemtemplate>
                                    <%# DateTime.Parse(Eval("RegDate").ToString()).ToString("yyyy-MM-dd") %>
                                 </itemtemplate>
                            </asp:TemplateField>
                            <asp:TemplateField meta:resourcekey="DetilData" HeaderText="锁定状态" SortExpression="IsLock">
                                <itemtemplate>
                                    <asp:Label ID="lblLockState" runat="server" Text='<%# FormatLockState(DataBinder.Eval(Container, "DataItem(IsLock)","{0}")) %>'></asp:Label>
                            
</itemtemplate>
                                <itemstyle width="4%" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="category" ForeColor="Black" />
                    </cc1:V5ShopGridView>
                </div>
            </div>
            <uc2:PageBottom ID="PageBottom" runat="server" />
            <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" />
            </div>
        </div>
        <script language="javascript" type="text/javascript">
        Calendar.setup({
            inputField     :    "txtRegDateStart",
            ifFormat       :    "%Y-%m-%d", 
            button         :    "ImgDateStart",
            align          :    "Br",
            singleClick    :    true
        });
        Calendar.setup({
            inputField     :    "txtRegDateEnd",
            ifFormat       :    "%Y-%m-%d", 
            button         :    "ImgDateEnd",
            align          :    "Br",
            singleClick    :    true
        });
        </script>
    </form>
</body>
</html>
