<%@ Page Language="C#" MasterPageFile="MasterPage.Master" AutoEventWireup="true" CodeBehind="UserAccountRecord.aspx.cs" Inherits="SocoShop.Web.Admin.UserAccountRecord" %>
<%@ Register Namespace="SkyCES.EntLib" Assembly="SkyCES.EntLib" TagPrefix="SkyCES"%>
<%@ Import Namespace="SocoShop.Entity" %>
<asp:Content ID="MasterContent" ContentPlaceHolderID="ContentPlaceHolder" runat="server">
<script type="text/javascript" src="/Admin/Pop/lhgdialog_ex.js"></script>	
<div class="position"><img src="/Admin/Style/Images/PositionIcon.png"  alt=""/>帐户明细列表</div>	
<ul class="search">
    <li>
        可用积分：<%=user.PointLeft%>；已消费金额：<%=user.MoneyUsed %> 元 ；账户余额：<%=user.MoneyLeft %> 元
    </li>
</ul>
<div class="listBlock">
    <ul>
        <li <%if(accountType==(int)AccountType.Money){%>class="listOn"<%} %>><a href="UserAccountRecord.aspx?UserID=<%=user.ID %>&AccountType=<%=(int)AccountType.Money %>">资金账户</a></li>
        <li <%if(accountType==(int)AccountType.Point){%>class="listOn"<%} %>><a href="UserAccountRecord.aspx?UserID=<%=user.ID %>&AccountType=<%=(int)AccountType.Point %>">积分账户</a></li>
    </ul>	
</div>
<ul class="listHead">
	<li style="width:5%">ID</li>
	<li style="width:15%; text-align:left;text-indent:8px;">时间</li>
	<li style="width:35%">备注</li>  
	<li style="width:10%">IP</li> 
	<li style="width:10%">收入</li>      
	<li style="width:10%">支出</li>  	   
	<li style="width:10%">剩余</li>  	        
	<li style="width:5%">选择</li>        
</ul>    
<%if(accountType==(int)AccountType.Money){%>
    <% foreach(UserAccountRecordInfo userAccountRecord in userAccountRecordList){
           moneyLeft += userAccountRecord.Money;%>
    <ul class="listMain" onmousemove="ChangeColor(this,'#FFFDD7')" onmouseout="ChangeColor(this,'#FFF')">
		<li style="width:5%"><%=userAccountRecord.ID%></li>
		<li style="width:15%; text-align:left;text-indent:8px;"><%=userAccountRecord.Date%></li>
		<li style="width:35%;text-align:left;"><%=userAccountRecord.Note%></li>  
        <li style="width:10%"><%=userAccountRecord.IP%></li> 	
		<li style="width:10%"><%if (userAccountRecord.Money > 0) {%><%=userAccountRecord.Money%><%} %>&nbsp;</li>      
        <li style="width:10%"><%if (userAccountRecord.Money< 0) {%><%=-userAccountRecord.Money%><%} %>&nbsp;</li> 	 
        <li style="width:10%"><%=moneyLeft%></li>       
		<li style="width:5%"><input type="checkbox" name="SelectID" value="<%=userAccountRecord.ID%>" /></li> 	        
	</ul>
	<%} %>
<%}else{ %>
    <% foreach(UserAccountRecordInfo userAccountRecord in userAccountRecordList){
           pointLeft += userAccountRecord.Point;%>
    <ul class="listMain" onmousemove="ChangeColor(this,'#FFFDD7')" onmouseout="ChangeColor(this,'#FFF')">
		<li style="width:5%"><%=userAccountRecord.ID%></li>
		<li style="width:15%; text-align:left;text-indent:8px;"><%=userAccountRecord.Date%></li>
		<li style="width:35%;text-align:left;"><%=userAccountRecord.Note%></li>  
        <li style="width:10%"><%=userAccountRecord.IP%></li> 	
		<li style="width:10%"><%if (userAccountRecord.Point > 0) {%><%=userAccountRecord.Point%><%} %>&nbsp;</li>      
        <li style="width:10%"><%if (userAccountRecord.Point< 0) {%><%=-userAccountRecord.Point%><%} %>&nbsp;</li> 	 
        <li style="width:10%"><%=pointLeft%></li>       
		<li style="width:5%"><input type="checkbox" name="SelectID" value="<%=userAccountRecord.ID%>" /></li> 	        
	</ul>
	<%} %>
<%} %>
<div class="listPage"><SkyCES:CommonPager ID="MyPager" runat="server" /></div>
<div class="action">
        <input type="button"  value=" 添 加 " class="button"  onclick="window.location.href='UserAccountRecordAdd.aspx?UserID=<%=userID %>'"/>&nbsp;<asp:Button CssClass="button" ID="DeleteButton" Text=" 删 除 " OnClientClick="return checkSelect()" runat="server"  OnClick="DeleteButton_Click"/>&nbsp;<input type="checkbox" name="All" onclick="selectAll(this)" />全选/取消
</div>
</asp:Content>
