<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="User.aspx.cs" Inherits="SocoShop.Web.Admin.User" %>
<%@ Register Namespace="SkyCES.EntLib" Assembly="SkyCES.EntLib" TagPrefix="SkyCES"%>
<%@ Import Namespace="SocoShop.Business" %>
<%@ Import Namespace="SocoShop.Common" %>
<%@ Import Namespace="SocoShop.Entity" %>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<script language="javascript" src="/Admin/js/calendar.js" type="text/javascript"></script>
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>用户列表</div>	
<ul class="search">
    <li>用户名：<SkyCES:TextBox ID="UserName" CssClass="input" runat="server"  /> Email：<SkyCES:TextBox ID="Email" CssClass="input" runat="server"  /> 
    性别：<asp:DropDownList ID="Sex" runat="server"></asp:DropDownList>
    注册时间：<SkyCES:TextBox CssClass="input" ID="StartRegisterDate" runat="server" RequiredFieldType="日期时间"  onfocus="cdr.show(this);"/> -- <SkyCES:TextBox CssClass="input" ID="EndRegisterDate" runat="server" RequiredFieldType="日期时间"  onfocus="cdr.show(this);"/>
     <asp:Button CssClass="button" ID="SearchButton" Text=" 搜 索 " runat="server"  OnClick="SearchButton_Click" /></li>
</ul>
<div  class="listBlock">
    <ul>       
        <li <%if(status== int.MinValue){%>class="listOn"<%} %> onclick="window.location='User.aspx'">所有用户</li>    
        <li <%if(status==1){%>class="listOn"<%} %> onclick="window.location='User.aspx?Action=search&Status=1'">未激活用户</li> 
        <li <%if(status==2){%>class="listOn"<%} %> onclick="window.location='User.aspx?Action=search&Status=2'">正常用户</li>       
        <li <%if(status==3){%>class="listOn"<%} %> onclick="window.location='User.aspx?Action=search&Status=3'">冻结用户</li>        
    </ul>	
</div>
<ul class="listHead">
	<li style="width:5%">ID</li>
	<li style="width:10%; text-align:left;text-indent:8px;">用户</li>
	<li style="width:10%">Email</li>
	<li style="width:20%">注册时间</li>
	<li style="width:10%">登陆次数</li>
	<li style="width:20%">最近登录时间</li>
	<li style="width:5%">状态</li>
	<li style="width:15%">管理</li>       
	<li style="width:5%">选择</li>        
</ul>
<asp:Repeater ID="RecordList" runat="server">
	<ItemTemplate>	     
        	<ul class="listMain" onmousemove="ChangeColor(this,'#FFFDD7')" onmouseout="ChangeColor(this,'#FFF')">
			<li style="width:5%"><%# Eval("ID") %></li>
			<li style="width:10%; text-align:left;text-indent:8px;"><%# Eval("UserName") %></li>
			<li style="width:10%"><%# Eval("Email") %></li>
	        <li style="width:20%"><%# Eval("RegisterDate") %></li>
	        <li style="width:10%"><%#Eval("LoginTimes")%></li>
	        <li style="width:20%"><%#Eval("LastLoginDate")%></li>
	        <li style="width:5%"><%#EnumHelper.ReadEnumChineseName<UserStatus>(Convert.ToInt32(Eval("Status")))%></li>
			<li style="width:15%;">			    
			    <a href="javascript:popPageOnly('UserPasswordAdd.aspx?ID=<%#Eval("ID")%>',600,250,'修改密码','UserPasswordAdd<%# Eval("ID") %>')"><img src="Style/Images/password.gif" alt="修改密码" title="修改密码" /></a> 
			    <a href="javascript:pop('UserAdd.aspx?ID=<%#Eval("ID")%>',800,600,'用户修改','UserAdd<%# Eval("ID") %>')"><img src="Style/Images/edit.gif" alt="修改" title="修改" /></a> 
			    <a href="javascript:popPageOnly('UserAddress.aspx?UserID=<%#Eval("ID")%>',800,600,'收货地址','UserAddress<%# Eval("ID") %>')"><img src="Style/Images/list.gif" alt="收货地址" title="收货地址" /></a> 
			    <a href="javascript:popPageOnly('UserAccountRecord.aspx?UserID=<%#Eval("ID")%>',800,600,'帐户明细','UserAccountRecord<%# Eval("ID") %>')"><img src="Style/Images/passport.gif" alt="帐户明细" title="帐户明细" /></a> 
			</li>
			<li style="width:5%"><input type="checkbox" name="SelectID" value="<%# Eval("ID") %>" /></li> 	        
		</ul>
        </ItemTemplate>
</asp:Repeater>
<div class="listPage"><SkyCES:CommonPager ID="MyPager" runat="server" /></div>
<div class="action">
        <input type="button"  value=" 添 加 " class="button" onclick="pop('UserAdd.aspx',800,600,'用户添加','UserAdd')"/>&nbsp;
        <%if(status==1){ %><asp:Button CssClass="button" ID="ActiveButton" Text=" 激 活 " OnClientClick="return checkSelect()" runat="server"  OnClick="ActiveButton_Click"/>&nbsp;<%} %>
        <%if(status==2){ %>
        <asp:Button CssClass="button" ID="UnActiveButton" Text="未激活" OnClientClick="return checkSelect()" runat="server"  OnClick="UnActiveButton_Click"/>&nbsp;
        <asp:Button CssClass="button" ID="FreezeButton" Text=" 冻 结 " OnClientClick="return checkSelect()" runat="server"  OnClick="FreezeButton_Click"/>&nbsp;
        <%} %>
        <%if(status==3){ %><asp:Button CssClass="button" ID="UnFreezeButton" Text="解除冻结" OnClientClick="return checkSelect()" runat="server"  OnClick="UnFreezeButton_Click"/>&nbsp;<%} %>
        <%if(status>0){ %><input type="checkbox" name="All" onclick="selectAll(this)" />全选/取消<%} %>
</div>
</asp:Content>
