<%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="SocoShop.Page.ProductReplyAjax" %>
<%@ 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:39.
	*/
	Stopwatch sw = new Stopwatch();
	sw.Start();
	base.OnInit(e);
	sw.Stop();
	 decimal processTime=Convert.ToDecimal(sw.ElapsedMilliseconds) / 1000;
	StringBuilder document = new StringBuilder();
	document.Append("<div class=\"height10\"></div>\r\n");
	foreach(ProductReplyInfo productReply in productReplyList)
{
	document.Append("<div class=\"productComment\">\r\n");
	document.Append("    <ul class=\"userInfo\">\r\n");
	if(productReply.UserID>0)
{
	
            UserInfo tempUser=UserBLL.ReadUserByUserList(userList,productReply.UserID);
            string userPhoto = tempUser.Photo;
            if (userPhoto == string.Empty)
            {
                userPhoto = "/Plugins/Template/" + ShopConfig.ReadConfigInfo().TemplatePath + "/Style/Images/NoImage.gif";
            }
            else
            {
                userPhoto = userPhoto.Replace("Original", "70-70");
            }
        
	document.Append("        <li class=\"photo\"><img src=\""+userPhoto+"\"  onload=\"photoLoad(this,70,70)\"/></li>\r\n");
	document.Append("        <li class=\"name\">"+productReply.UserName+"</li>\r\n");
	document.Append("        <li><a href=\"javascript:addFriend("+productReply.UserID+")\"><img src=\"/Plugins/Template/Red/style/images/addFriend.gif\" /> 加为好友</a></li>\r\n");
	}
else
{
	document.Append("        <li class=\"photo\"><img src=\"/Plugins/Template/Red/Style/Images/NoImage.gif\" onload=\"photoLoad(this,70,70)\" /></li>\r\n");
	document.Append("        <li class=\"name\">匿名用户</li>\r\n");
	 }
	document.Append("    </ul>\r\n");
	document.Append("    <ul class=\"commentContent\">\r\n");
	document.Append("       <li>"+productReply.Content+"</li>\r\n");
	document.Append("    </ul>\r\n");
	document.Append("</div>\r\n");
	document.Append("<div class=\"height10\"></div>\r\n");
	}
	document.Append(""+ajaxPagerClass.ShowPage()+"\r\n");
	document.Append("<div class=\"height10\"></div>\r\n");
	Response.Write(document.ToString());
}
</script>