<%@ Page language="c#" AutoEventWireup="false" EnableViewState="false" Inherits="SocoShop.Page.VoteResult" %>
<%@ 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("<li>"+vote.Title+"</li>\r\n");
	if(action == "Prepare")
{
	foreach(VoteItemInfo voteItem in voteItemList)
{
	if(vote.VoteType==(int)VoteType.Radio)
{
	document.Append("        <li><input name=\"vote\" type=\"radio\" value=\""+voteItem.ID+"\">&nbsp;&nbsp;"+voteItem.ItemName+"</li> \r\n");
	}
else
{
	document.Append("        <li><input name=\"vote\" type=\"checkbox\" value=\""+voteItem.ID+"\">&nbsp;&nbsp;"+voteItem.ItemName+"</li> \r\n");
	 }
	}
	document.Append("    <li><input type=\"button\" class=\"button\" value=\"提 交\" onclick=\"vote("+vote.ID+","+(int)vote.VoteType+")\" />&nbsp;&nbsp;<input  type=\"button\" class=\"button\" value=\" 查 看\" onclick=\"viewResult()\" /> </li> \r\n");
	}
else
{
	int i=1;
	foreach(VoteItemInfo voteItem in voteItemList)
{
	document.Append("    <li>"+i+"、"+voteItem.ItemName+"：<span class=\"voteCount\">"+voteItem.VoteCount+"</span></li> \r\n");
	i++;
	}
	document.Append("    <li><input type=\"button\" class=\"button\"  value=\"返 回\" onclick=\"prePareVote()\" /> </li> \r\n");
	 }
	Response.Write(document.ToString());
}
</script>