<%@ Page language="c#" Codebehind="SurveyStat.aspx.cs" AutoEventWireup="true" Inherits="XpShop.Manage.SurveyStat" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	    <!--#include file="inc/head.inc"-->
		<title>调查统计</title>
		<style type="text/css">
		    table {border-collapse:collapse;border:solid #999;border-width:1px 0 0 1px;}
            table caption {font-size:14px;font-weight:bolder;}
            table th,table td {border:solid #999;border-width:0 1px 1px 0;padding:2px;}
            tfoot td {text-align:center;}
		</style>
	</head>
	<body>
	    <div class="container">
		<div class="sub_container">
		<div class="sub_container_title"><a href="<%=AdminDefault%>" target="_top">桌面</a><img src="images/admin_title.jpg" height=9px width=8px align="absmiddle" />问卷调查结果统计  <a href='Survey.aspx?Action=Manage'>返回</a></div>
		<div class="sub_container_content">
		    <form id="Form1" method="post" runat="server">
		        <div class="frame">
		            <div class="frame_title"> <asp:Label ID="lbTitle" Runat="server" CssClass="tableHeaderText"></asp:Label><a href='Survey.aspx?Action=Manage'>返回</a></div>
		            <div class="frame_content">
			            <br />
			            <asp:Repeater id="rptSurveyItem" runat="server">
                            <ItemTemplate>
                                <table class="tableBorder" cellSpacing="0" cellPadding="0" width="95%" align="center" border="1" style="text-align:left;">
                                    <tr>
                                    <td>
                                        <span style="float:left;"><%# DataBinder.Eval(Container.DataItem,"Title") %></span>
                                        <span style="margin-right:0px; float:right;">总数：<%# DataBinder.Eval(Container.DataItem,"TotalVot") %></span>
                                    </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <table style="width:100%;">
                                                <tr>
                                                    <td>
                                                        选项名称
                                                    </td>
                                                    <td style="width:50px;">投票数</td>
                                                    <td colspan="2">百分比</td>
                                                </tr>
                                                <asp:Repeater ID="rptOptions" runat="server" DataSource='<%# BindOptions((int)DataBinder.Eval(Container.DataItem,"SurveyItemID")) %>'>
                                                    <ItemTemplate>
                                                    <tr>
                                                        <td><%# DataBinder.Eval(Container.DataItem,"OptionName") %></td>
                                                        <td style="width:50px;"><%# DataBinder.Eval(Container.DataItem,"VotCount") %></td>
                                                        <td style="width:50px;"><%# GetPercent(DataBinder.Eval(Container.DataItem, "VotCount").ToString(), (int)DataBinder.Eval(Container.DataItem, "SurveyItemID"))%>%</td>
                                                        <td style="width:120px; padding-left:6px;">
                                                            <div style="border:1px solid #767676; width:100%;"><img src='images/vote_co.gif' alt='' width='<%# GetPercent(DataBinder.Eval(Container.DataItem, "VotCount").ToString(), (int)DataBinder.Eval(Container.DataItem, "SurveyItemID"))%>%' height="7" /></div>
                                                        </td>
                                                    </tr>
                                                    </ItemTemplate>
                                                </asp:Repeater>
	                                         </table>
                                        </td>
                                    </tr>
                                </table>
                                <br />
                            </ItemTemplate>
                        </asp:Repeater>
		            </div>
	            </div>
	        </form>
		</div>
		</div>
		</div>
	</body>
</html>
