<%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="SocoShop.Page.UserRechargeAjax" %>
<%@ 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();
	switch(action)
{
	case "Read":
	document.Append("    <table class=\"listTable\" cellpadding=\"0\" cellpadding=\"0\">\r\n");
	document.Append("        <tr class=\"listTableHead\">                               \r\n");
	document.Append("            <td width=\"20%\" style=\"text-align:left;padding-left:5px;\">流水号</td>\r\n");
	document.Append("            <td width=\"15%\">金额(元)</td>\r\n");
	document.Append("            <td width=\"25%\">充值时间</td>\r\n");
	document.Append("            <td width=\"25%\">支付方式</td>\r\n");
	document.Append("            <td width=\"15%\">是否完成</td>\r\n");
	document.Append("        </tr>\r\n");
	foreach(UserRechargeInfo userRecharge in userRechargeList)
{
	document.Append("        <tr class=\"listTableMain\">                             \r\n");
	document.Append("            <td style=\"text-align:left;padding-left:5px;\">"+userRecharge.Number +"</td>\r\n");
	document.Append("            <td>"+userRecharge.Money +"</td>\r\n");
	document.Append("            <td>"+userRecharge.RechargeDate +"</td>\r\n");
	document.Append("            <td>"+userRecharge.PayName +"</td>\r\n");
	document.Append("            <td>\r\n");
	if(userRecharge.IsFinish==1)
{
	document.Append("是\r\n");
	}
else
{
	document.Append("否\r\n");
	 }
	document.Append("</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");
	break;
	case "Add":
	document.Append("    <div class=\"add\">\r\n");
	document.Append("        <ul>\r\n");
	document.Append("            <li class=\"left\">用户：</li>\r\n");
	document.Append("            <li class=\"right\">"+Sessions.UserName+"</li>\r\n");
	document.Append("        </ul>\r\n");
	document.Append("        <ul>\r\n");
	document.Append("            <li class=\"left\">余额：</li>\r\n");
	document.Append("            <li class=\"right\">"+Sessions.MoneyLeft+"</li>\r\n");
	document.Append("        </ul>  \r\n");
	document.Append("        <ul>\r\n");
	document.Append("            <li class=\"left\">充值金额：</li>\r\n");
	document.Append("            <li class=\"right\"><input type=\"text\" class=\"input\" style=\"width:100px\" id=\"Money\" />（元）</li>\r\n");
	document.Append("        </ul>\r\n");
	document.Append("         <ul>\r\n");
	document.Append("            <li class=\"left\">支付方式：</li>\r\n");
	document.Append("            <li class=\"right\">\r\n");
	foreach(PayPluginsInfo payPlugins in payPluginsList)
{
	document.Append("<input type=\"radio\" name=\"PayKey\" value=\""+payPlugins.Key+"\" />"+payPlugins.Name+"\r\n");
	}
	document.Append("</li>\r\n");
	document.Append("        </ul> \r\n");
	document.Append("        <ul>\r\n");
	document.Append("            <li class=\"left\">&nbsp;</li>\r\n");
	document.Append("            <li class=\"right\"><input type=\"button\" class=\"button\" value=\"确定\" onclick=\"addUserRecharge()\" /></li>\r\n");
	document.Append("        </ul> \r\n");
	document.Append("    </div>\r\n");
	break;
	default:
	break;
	
 }
	Response.Write(document.ToString());
}
</script>