<%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="SocoShop.Page.UserAccountRecordAjax" %>
<%@ Import namespace="SocoShop.Entity" %>
<%@ Import namespace="SocoShop.Business" %>
<%@ Import namespace="SocoShop.Common" %>
<%@ Import namespace="SkyCES.EntLib" %>
<%@ Import namespace="System.Diagnostics" %>
<script runat="server">
protected override void OnInit(EventArgs e)
{
	/* 
		本页面代码由天易模板生成于 2011/3/6 19:11:38.
	*/
	Stopwatch sw = new Stopwatch();
	sw.Start();
	base.OnInit(e);
	sw.Stop();
	 decimal processTime=Convert.ToDecimal(sw.ElapsedMilliseconds) / 1000;
	StringBuilder document = new StringBuilder();
	document.Append("<table class=\"listTable\" cellpadding=\"0\" cellpadding=\"0\">\r\n");
	document.Append("    <tr class=\"listTableHead\">                               \r\n");
	document.Append("        <td width=\"20%\">时间</td>\r\n");
	document.Append("        <td width=\"40%\" style=\"text-align:left;padding-left:5px;\">备注</td>\r\n");
	document.Append("        <td width=\"10%\">IP</td>\r\n");
	document.Append("        <td width=\"10%\">收入</td>\r\n");
	document.Append("        <td width=\"10%\">支出</td>\r\n");
	document.Append("        <td width=\"10%\">剩余</td>\r\n");
	document.Append("    </tr>\r\n");
	if(accountType==(int)AccountType.Money)
{
	foreach(UserAccountRecordInfo userAccountRecord in userAccountRecordList)
{
	
        moneyLeft += userAccountRecord.Money;
    
	document.Append("    <tr class=\"listTableMain\">\r\n");
	document.Append("        <td>"+userAccountRecord.Date+"</td>\r\n");
	document.Append("        <td style=\"text-align:left;padding-left:5px;\">"+userAccountRecord.Note+"</td>\r\n");
	document.Append("        <td>"+userAccountRecord.IP+"</td>\r\n");
	document.Append("        <td>\r\n");
	if(userAccountRecord.Money > 0)
{
	document.Append(""+userAccountRecord.Money+"\r\n");
	 }
	document.Append("&nbsp;</td>\r\n");
	document.Append("        <td>\r\n");
	if(userAccountRecord.Money < 0)
{
	document.Append(""+-userAccountRecord.Money+"\r\n");
	 }
	document.Append("&nbsp;</td>\r\n");
	document.Append("        <td>"+moneyLeft+"</td>\r\n");
	document.Append("    </tr>\r\n");
	}
	}
else
{
	foreach(UserAccountRecordInfo userAccountRecord in userAccountRecordList)
{
	
        pointLeft += userAccountRecord.Point;
    
	document.Append("    <tr class=\"listTableMain\">\r\n");
	document.Append("        <td>"+userAccountRecord.Date+"</td>\r\n");
	document.Append("        <td style=\"text-align:left;padding-left:5px;\">"+userAccountRecord.Note+"</td>\r\n");
	document.Append("        <td>"+userAccountRecord.IP+"</td>\r\n");
	document.Append("        <td>\r\n");
	if(userAccountRecord.Point > 0)
{
	document.Append(""+userAccountRecord.Point+"\r\n");
	 }
	document.Append("&nbsp;</td>\r\n");
	document.Append("        <td>\r\n");
	if(userAccountRecord.Point < 0)
{
	document.Append(""+-userAccountRecord.Point+"\r\n");
	 }
	document.Append("&nbsp;</td>\r\n");
	document.Append("        <td>"+pointLeft+"</td>\r\n");
	document.Append("    </tr>\r\n");
	}
	 }
	document.Append("</table>\r\n");
	document.Append("<div class=\"height10\"></div>\r\n");
	document.Append("<div>"+ajaxPagerClass.ShowPage()+"</div>\r\n");
	Response.Write(document.ToString());
}
</script>