<%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="SocoShop.Page.ProductAjax" %>
<%@ 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=\"productBox\">\r\n");
	int i=0;
	foreach(ProductInfo product in productList)
{
	if(productShowWay==(int)ProductShowWay.Picture)
{
	document.Append("    <ul class=\"productPicture\">\r\n");
	document.Append("        <li class=\"photo\"><a href=\"/ProductDetail-I"+product.ID+".aspx\" target=\"_blank\"><img src=\""+product.Photo.Replace("Original","120-120")+"\"  onload=\"photoLoad(this,120,120)\" /></a></li>\r\n");
	document.Append("        <li><a href=\"/ProductDetail-I"+product.ID+".aspx\" target=\"_blank\">"+product.Name+"</a></li>\r\n");
	document.Append("        <li class=\"maketPrice\">市场价￥"+product.MarketPrice+" </li>\r\n");
	if(countPriceSingle)
{
	document.Append("        <li class=\"salePrice\">售价：￥"+MemberPriceBLL.ReadCurrentMemberPrice(memberPriceList,Sessions.GradeID,product)+"</li>\r\n");
	}
else
{
	document.Append("        <li class=\"salePrice\">售价：￥"+product.CurrentMemberPrice+"</li>\r\n");
	 }
	document.Append("    </ul> \r\n");
	}
else
{
	document.Append("    <div class=\"productList\">\r\n");
	document.Append("        <ul class=\"productLeft\">\r\n");
	document.Append("            <li class=\"photo\"><a href=\"/ProductDetail-I"+product.ID+".aspx\" target=\"_blank\"><img src=\""+product.Photo.Replace("Original","120-120")+"\"  onload=\"photoLoad(this,120,120)\" /></a></li>\r\n");
	document.Append("        </ul>\r\n");
	document.Append("        <ul  class=\"productCenter\">\r\n");
	document.Append("            <li><a href=\"/ProductDetail-I"+product.ID+".aspx\" class=\"productName\" target=\"_blank\">"+product.Name+"</a></li>\r\n");
	document.Append("            <li>用户综合评分：<span class=\"grade\"><i style=\"width:"+product.PerPoint*20+"%\"></i></span> <span class=\"point\">"+product.PerPoint+"</span>（已有 <span class=\"commentCount\">"+product.CommentCount+"</span> 人评价）</li>\r\n");
	document.Append("            <li>"+product.Summary+"</li>\r\n");
	document.Append("        </ul>\r\n");
	document.Append("        <ul class=\"productRight\">\r\n");
	document.Append("            <li class=\"maketPrice\">市场价：￥"+product.MarketPrice+" </li>\r\n");
	if(countPriceSingle)
{
	document.Append("            <li class=\"salePrice\">售价：￥"+MemberPriceBLL.ReadCurrentMemberPrice(memberPriceList,Sessions.GradeID,product)+"</li>\r\n");
	}
else
{
	document.Append("            <li class=\"salePrice\">售价：￥"+product.CurrentMemberPrice+"</li>\r\n");
	 }
	document.Append("            <li><a href=\"javascript:collectProduct("+product.ID+")\">收藏</a> | <a href=\"/ProductDetail-I"+product.ID+".aspx\">查看</a></li>\r\n");
	document.Append("        </ul>\r\n");
	document.Append("    </div> \r\n");
	document.Append("    <div class=\"line\"></div>\r\n");
	 }
	i++;
	if(i%5==0)
{
	document.Append("</div><div class=\"productBox\">\r\n");
	 }
	}
	document.Append("</div>\r\n");
	document.Append("<div class=\"height10\"></div>\r\n");
	document.Append(""+ajaxPagerClass.ShowPage()+"\r\n");
	document.Append("#"+ajaxPagerClass.Count+"\r\n");
	Response.Write(document.ToString());
}
</script>