<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ShopEval.aspx.cs" Inherits="XpShop.WebUI.ShopEval" %>
<%@ Register TagPrefix="uc1" TagName="Footer" Src="/Template/XpShopFreeDemo_1_1/Modules/Footer.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Helper" Src="/Template/XpShopFreeDemo_1_1/Modules/Helper.ascx" %>
<%@ Register TagPrefix="uc1" TagName="Header" Src="/Template/XpShopFreeDemo_1_1/Modules/Header.ascx" %>
<%@ Register TagPrefix="uc1" TagName="LeftNavTop2Level" Src="/Template/XpShopFreeDemo_1_1/Modules/LeftNavTop2Level.ascx" %>
<!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/encoding.inc"-->
		<link rel="stylesheet" href="<%=webSite %>store/style/skin.css" type="text/css"/>
		<link href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/PageBar.css" rel="stylesheet" type="text/css"/>
		<script src="<%=webSite %>Template/<%=config.TemplateFolder%>/inc/PageBar.js" type="text/javascript"></script>
        <link rel="Shortcut Icon" href="<%=webSite %>favicon.ico">
        <link rel="Bookmark" href="<%=webSite %>favicon.ico"> 
        <script src="<%=webSite %>inc/jquery-1.2.6.min.js" type="text/javascript"></script>
        <script src="<%=webSite %>inc/productImgShow/highslide.js"  type="text/javascript"></script>
        <link rel="stylesheet" href="<%=webSite %>Template/<%=config.TemplateFolder%>/style/skin_990s.css" type="text/css"/>

	</head>
	<body>
		<uc1:Header id="Header1" runat="server"></uc1:Header>
		<div class="xp-w clear">
		    <!--位置导航开始-->
		    <div class="path"><a href="<%=webSite %><%if(config.html==""){%>default.aspx<%}else{%>Index.<%=config.html%><%}%>"><%=GetResourceString("Home")%></a>&nbsp;&gt;&nbsp;商家评论</div>
		    <!--位置导航结束-->
			<div id="content_left">
		        <!--商家信息开始-->
		        <div class="lframe">
			        <div class="tl"></div>
			        <div class="tr"></div>
			        <div class="tm">
				        商家信息
			        </div>
			        <div class="ml"></div>
			        <div class="mr"></div>
			        <div class="mm clearfix">
				        <ul style="width: 190px;">
					        <li style="line-height: 20px; overflow: hidden;">被评卖家: <b><%=supplierDetail.Contacter %></b></li>
					        <li style="line-height: 20px; overflow: hidden;">被评店铺:<b><%=supplierDetail.SupplierName%></b></li>
					        <li style="line-height: 20px; overflow: hidden;">
						        <table>
							        <tbody><tr>
								        <td>商家评分：</td>
										<td><div class="pingfen<%=Convert.ToInt32(supplierDetail.PingFen)==0 ? 5 : Convert.ToInt32(supplierDetail.Pj1)%>"></div></td>
							        </tr>
						        </tbody></table>
					        </li>
					        <li style="line-height: 20px; overflow: hidden;">评论数：<%=supplierDetail.Reviews%></li>

				        </ul>
			        </div>
			        <div class="bl"></div>
			        <div class="br"></div>
			        <div class="bm"></div>
		        </div>
		        <!--商家信息结束-->
			</div>
			<div id="content_right">
		
			<div class="mframe">
					<div class="tl"></div>
					<div class="tr"></div>
					<div class="tm">
					    发表评价
					</div>
					<div class="ml"></div>
					<div class="mr"></div>
					<div class="mm">
				        <%if(CurrentUser != null && CurrentUser.Name != "anonymous") {%>
				            <% if(canEval){%>
				            <form id="Form1" method="post" runat="server">
		                        <table>
		                            <tr>
		                                <td>评价标题</td>
		                                <td><asp:TextBox runat="server" ID="txtTitle" Columns="80"></asp:TextBox></td>
		                            </tr>
		                            <tr>
		                                <td valign="top">评价内容</td>
		                                <td><asp:TextBox id="txtContent" runat="server" TextMode="MultiLine" Columns="80" Rows="5"></asp:TextBox></td>
		                            </tr>
		                            <tr>
		                                <td>信息可信度</td>
		                                <td>
		                                    <asp:RadioButtonList id="rblPj1" runat="server" RepeatDirection="Horizontal">
			                                    <asp:ListItem Value="5" Selected="true">5分 </asp:ListItem>
			                                    <asp:ListItem Value="4">4分 </asp:ListItem>
			                                    <asp:ListItem Value="3">3分 </asp:ListItem>
			                                    <asp:ListItem Value="2">2分 </asp:ListItem>
			                                    <asp:ListItem Value="1">1分 </asp:ListItem>
		                                    </asp:RadioButtonList>
		                                </td>
		                            </tr>
	                                <tr>
		                                <td>价格水平</td>
		                                <td>
		                                    <asp:RadioButtonList id="rblPj2" runat="server" RepeatDirection="Horizontal">
			                                    <asp:ListItem Value="5" Selected="true">5分 </asp:ListItem>
			                                    <asp:ListItem Value="4">4分 </asp:ListItem>
			                                    <asp:ListItem Value="3">3分 </asp:ListItem>
			                                    <asp:ListItem Value="2">2分 </asp:ListItem>
			                                    <asp:ListItem Value="1">1分 </asp:ListItem>
		                                    </asp:RadioButtonList>
		                                </td>
		                            </tr>
			                            <tr>
		                                <td>送货速度</td>
		                                <td>
		                                    <asp:RadioButtonList id="rblPj3" runat="server" RepeatDirection="Horizontal">
			                                    <asp:ListItem Value="5" Selected="true">5分 </asp:ListItem>
			                                    <asp:ListItem Value="4">4分 </asp:ListItem>
			                                    <asp:ListItem Value="3">3分 </asp:ListItem>
			                                    <asp:ListItem Value="2">2分 </asp:ListItem>
			                                    <asp:ListItem Value="1">1分 </asp:ListItem>
		                                    </asp:RadioButtonList>
		                                </td>
		                            </tr>
	                                <tr>
		                                <td>客户服务</td>
		                                <td>
		                                    <asp:RadioButtonList id="rblPj4" runat="server" RepeatDirection="Horizontal">
			                                    <asp:ListItem Value="5" Selected="true">5分 </asp:ListItem>
			                                    <asp:ListItem Value="4">4分 </asp:ListItem>
			                                    <asp:ListItem Value="3">3分 </asp:ListItem>
			                                    <asp:ListItem Value="2">2分 </asp:ListItem>
			                                    <asp:ListItem Value="1">1分 </asp:ListItem>
		                                    </asp:RadioButtonList>
		                                </td>
		                            </tr>
	                                <tr>
		                                <td></td>
		                                <td>
		                                    <asp:Button id="btnSubmit" onclick="btnSubmit_Click" runat="server" Text="提交"></asp:Button>
		                                </td>
		                            </tr>
		                        </table>
	                        </form>
	                        <%}  %>
	                        <%else
                            {%>
                            <h2>您暂不能对该商家进行评价，可能有以下原因：</h2>
                            1.您这次交易还没有完成；<br />
                            2.您已经对这次交易评价过该商家。 <br />
                            <%
                            }%>
	                    <%} else {%>
	                        <div class="clear">只有与商家完成交易后的用户才可以对商家进行评价 <a href='../Login.aspx?ReturnUrl=<%=webSite %>/ShopEval.aspx?orderid=<%=Request.QueryString["orderid"] %>&sid=<%=Request.QueryString["sid"] %>'>请先登录</a></div>
	                    <%} %>
				    </div>
				<div class="bl"></div>
				<div class="br"></div>
				<div class="bm"></div>
			</div>
			    
			</div>
			<div style="clear:both;"></div>
		</div>
		<uc1:Helper id="Helper1" runat="server"></uc1:Helper>
		<uc1:Footer id="Footer1" runat="server"></uc1:Footer>			
	</body>
</html>