<%@ Page Language="C#" MasterPageFile="../Admin.master" AutoEventWireup="true" Inherits="Ruiao.WebSite.Public.Admin.MemberManage" Codebehind="MemberManage.aspx.cs" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<asp:Content ID="MyContent" ContentPlaceHolderID="cphMain" Runat="Server">

    <fieldset class="ContentBox">
    <div class="Head" onclick="BoxSwitch('mc_MemberNotice','si_MemberNotice')"><div class="Title"><%=MyTitle %></div><div id="si_MemberNotice" class="SwitchIcon_Up"></div></div>
    <div class="Body" id="mc_MemberNotice">
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px"><strong>注意事项：</strong></div><div class="ContentItem_03b" style="width:649px">
        <ul class="NotesMessage">
        <li>会员名称一栏中，前面是会员的显示名，括号内是会员的登录名；</li>
        <li>您可以批量移动会员到相应的组和批量删除会员，删除操作是不可逆的；</li>
        <li>点击编辑可以修改该会员的资料信息；</li>
        <li>点击设置可以修改该会员的系统设置信息；</li>
        <li>点击会员组名称可以进入相应的会员组编辑界面；</li></ul>
        </div></div>
        
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px"><strong>快速查看：</strong></div><div class="ContentItem_03b" style="width:649px">
        <a href="MemberManage<%=ExtensionName %>">所有会员</a> | <a href="MemberManage<%=ExtensionName %>?LastLoginTimeType=2&LastLoginTimeDay=1">24小时内登录</a> | <a href="MemberManage<%=ExtensionName %>?AddTimeType=2&AddTimeDay=1">24小时内注册</a>
        </div></div>
    </div>
    <div class="Bottom"></div>
	</fieldset>
	<div class="ContentBox_Separator"></div>

    <fieldset class="ContentBox">
    <div class="Head" onclick="BoxSwitch('mc_DataSelect','si_DataSelect')"><div class="Title">会员筛选：</div><div id="si_DataSelect" class="SwitchIcon_Down"></div></div>
    <div class="Body" id="mc_DataSelect" style="display:none;">
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">登录名：</div><div class="ContentItem_03b" style="width:649px"><asp:TextBox ID="tbLoginName" runat="server"></asp:TextBox><asp:CheckBox ID="cbxIsFullLoginName" runat="server" Text="匹配完整登录名" /></div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">显示名：</div><div class="ContentItem_03b" style="width:649px"><asp:TextBox ID="tbDisplayName" runat="server"></asp:TextBox><asp:CheckBox ID="cbxIsFullDisplayName" runat="server" Text="匹配完整显示名" /></div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">电子邮箱：</div><div class="ContentItem_03b" style="width:649px"><asp:TextBox ID="tbEmail" runat="server"></asp:TextBox></div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">会员组：</div><div class="ContentItem_03b" style="width:649px"><asp:DropDownList ID="ddlMemberGroupID" runat="server"></asp:DropDownList></div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">性别：</div><div class="ContentItem_03b" style="width:649px"><asp:DropDownList ID="ddlSex" runat="server"></asp:DropDownList></div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">婚姻状态：</div><div class="ContentItem_03b" style="width:649px"><asp:DropDownList ID="ddlWedlock" runat="server"></asp:DropDownList></div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">最后登录IP：</div><div class="ContentItem_03b" style="width:649px"><asp:TextBox ID="tbLastLoginIP" runat="server"></asp:TextBox></div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">最后登录时间：</div><div class="ContentItem_03b" style="width:649px"><asp:DropDownList ID="ddlLastLoginTime" runat="server"><asp:ListItem Value="1">多于</asp:ListItem><asp:ListItem Value="2">少于</asp:ListItem></asp:DropDownList><asp:TextBox ID="tbLastLoginTimeDay" runat="server" Width="30px" /> 天</div></div>
        <div class="ContentItem_03"><div class="ContentItem_03a" style="width:120px">注册时间：</div><div class="ContentItem_03b" style="width:649px"><asp:DropDownList ID="ddlAddTime" runat="server"><asp:ListItem Value="1">多于</asp:ListItem><asp:ListItem Value="2">少于</asp:ListItem></asp:DropDownList><asp:TextBox ID="tbAddTimeDay" runat="server" Width="30px" /> 天</div></div>
        
        <div class="ContentItem">        
        <asp:Button ID="btSelectData" runat="server" Text="筛选会员" OnClick="btSelectData_Click" CssClass="LinkButton" />
        </div>
    </div>
    <div class="Bottom"></div>
	</fieldset>
	<div class="ContentBox_Separator"></div>
	
	<table id="MemberList" class="MainContentTable" cellspacing="1">
	<tr class="HeadTR">
	    <td class="HeadTD" style="width:20px;">ID</td>
		<td class="HeadTD" style="width:220px;">会员名称</td>
		<td class="HeadTD" style="width:120px;">会员组</td>
		<td class="HeadTD" style="width:80px;">最后登录IP</td>
		<td class="HeadTD" style="width:80px;">最后登录时间</td>
		<td class="HeadTD" style="width:80px;">注册时间</td>
		<td class="HeadTD" style="width:40px;">编辑</td>
		<td class="HeadTD" style="width:40px;">设置</td>
		<td class="HeadTD" style="width:40px;">操作</td>
	</tr>
	<tr class="ItemTR">
	    <td colspan="9" class="ItemTD" style="width:100%; text-align:left"><strong>符合条件的会员共计：<span style="color:Red; margin:0px 2px 0px 2px"><%=Pager.RecordCount %></span>名</strong></td>
	</tr>
	
    <asp:Repeater ID="rpMemberList" runat="server" OnItemCreated="rpMemberList_ItemCreated">
    <ItemTemplate>
    <tr class="ItemTR" onmouseover="this.className='onItemTR';" onmouseout="this.className='ItemTR';">
        <td class="ItemTD"><asp:Label ID="lbID" runat="server" Text='<%# DataBinder.Eval(Container, "DataItem.ID")%>' /></td>
		<td class="ItemTD" style="text-align:left"><%# DataBinder.Eval(Container, "DataItem.DisplayName")%>(<%# DataBinder.Eval(Container, "DataItem.LoginName") %>)</td>
		<td class="ItemTD"><%# MyMemberGroup.Name %></td>
		<td class="ItemTD"><%# DataBinder.Eval(Container, "DataItem.LastLoginIP") %></td>
		<td class="ItemTD"><%# ((DateTime)DataBinder.Eval(Container, "DataItem.LastLoginTime")).ToString("yyyy-MM-dd") %></td>		
		<td class="ItemTD"><%# ((DateTime)DataBinder.Eval(Container, "DataItem.AddTime")).ToString("yyyy-MM-dd") %></td>
		<td class="ItemTD"><a target="_blank" href="<%=AppUrl %>/Member/InfoEdit<%=ExtensionName %>?MemberID=<%# DataBinder.Eval(Container, "DataItem.ID") %>">编辑</a></td>
		<td class="ItemTD"><a href="<%=AppUrl %>/Admin/Member/MemberEdit<%=ExtensionName %>?MemberID=<%# DataBinder.Eval(Container, "DataItem.ID") %>">设置</a></td>
		<td class="ItemTD"><asp:CheckBox ID="cbxSelect" runat="server" /></td>
	</tr>
    </ItemTemplate>
    </asp:Repeater>
    
    <tr class="ItemTR">
    <td class="ItemTD" colspan="9" style="text-align:left;">
    <webdiyer:AspNetPager ID="Pager" runat="server" OnPageChanged="Pager_PageChanged" AlwaysShow="True" UrlPaging="False" />
    <strong>请选择要进行的操作：</strong>
    <input type="radio" name="Action" value="Delete" /> 删除会员&nbsp;&nbsp;<input type="radio" name="Action" value="MemberGroupMove" checked="checked" /> 移动至会员组：<asp:DropDownList ID="ddlMoveToMemberGroupID" runat="server"></asp:DropDownList> <asp:Button ID="btEnter" runat="server" Text='执行操作' OnClick="btEnter_Click" CssClass="LinkButton" /><input id="CheckAll" type="button" value="反转选择项" class="LinkButton" onclick="checkAll(this.form); return false;" /></td>
    </tr>
    
    </table>
</asp:Content>