<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_shop_review, mallz" title="信用评价" enableviewstate="false" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function setButtonActive()
{
   var _flag=document.getElementById("ctl00_ContentPlaceHolder1_reviewtype").value;
   if(_flag=="")
    _flag = "0";
   _flag = parseInt(_flag);
   var ulObj=document.getElementById("M1");
   for(var i=0;i<ulObj.childNodes.length;i++)
     ulObj.childNodes[i].className="";
   ulObj.childNodes[_flag].className="active";
}
</script>
 <div class="pageTitle">我的评价</div>
 <div style="width:98%">
    <div style="float:left; width:200px; height:300px; margin:5px;">
      <table  class="tableHead" style="height:300px">
          <tr>
             <td  style="background:#F8F8F8; padding:5px;">
               卖家好评率： <asp:Label ID="Labwellsaleperson" runat="server"  CssClass="font_orange_14" /> %<br />
               买家好评率： <asp:Label ID="Labwellbuyperson" runat="server"  CssClass="font_orange_14"/> %<br />
            </td>
         </tr>
      </table>          
    </div>
    <!--信用度-->
    <div style="float:left; width:72% !Important; width:auto; margin-top:5px;">
    
        <asp:HyperLink ID="BuyerReviewUrl" runat="server" Text="&nbsp;卖家信用度" Target="_blank"/> <asp:Label ID="SalerReviewNums" runat="server" />      
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="ReviewDataSource0" CssClass="tableHead" RowStyle-HorizontalAlign="Center" >
            <Columns>
                <asp:TemplateField HeaderText="等级">                
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# Bind("StarImageURL") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="rday" HeaderText="当天" />
                <asp:BoundField DataField="rweek" HeaderText="最近一个星期" />
                <asp:BoundField DataField="rmonth" HeaderText="最近一个月" />
                <asp:BoundField DataField="rmonth" HeaderText="最近六个月" />
                <asp:BoundField DataField="ryear" HeaderText="当年" />
                <asp:BoundField DataField="CountStar" HeaderText="总计" />
            </Columns>         
        </asp:GridView>
         <br />
        <asp:HyperLink ID="SalerReviewUrl" runat="server" Text="&nbsp;买家信用度" Target="_blank"/> <asp:Label ID="BuyerReviewNums" runat="server" />  
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ReviewDataSource" CssClass="tableHead" RowStyle-HorizontalAlign="Center">
            <Columns>
                <asp:TemplateField HeaderText="等级">             
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# Bind("StarImageURL") %>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="rday" HeaderText="当天" />
                <asp:BoundField DataField="rweek" HeaderText="最近一个星期" />
                <asp:BoundField DataField="rmonth" HeaderText="最近一个月" />
                <asp:BoundField DataField="rmonth" HeaderText="最近六个月" />
                <asp:BoundField DataField="ryear" HeaderText="当年" />
                <asp:BoundField DataField="CountStar" HeaderText="总计" />
            </Columns>                       
        </asp:GridView>
    
    </div> 
 </div>
 <div class="clear"></div>
  
 <!--评价内容区-->
<div id="MainMenu">
	<div class="TabMenu">
		<!--一级导航-->				
       <ul id="M1" >
          <li class="active"><asp:LinkButton ID="all_review" runat="server" CommandName="0" OnCommand="SelectType" Text="所有评价" /></li>  
          <li><asp:LinkButton ID="buyer_review" runat="server" CommandName="1" OnCommand="SelectType" Text="买家评价" /></li> 
          <li><asp:LinkButton ID="saler_review" runat="server" CommandName="2" OnCommand="SelectType" Text="卖家评价" /></li> 
          <li><asp:LinkButton ID="my_review_buyer" runat="server" CommandName="3" OnCommand="SelectType" Text="给卖家评价" /></li> 
          <li><asp:LinkButton ID="my_review_saler" runat="server" CommandName="4" OnCommand="SelectType" Text="给买家评价" /></li> 
        </ul>
     </div>
     <asp:HiddenField ID="reviewtype" runat="server" />
     <div class="TabText">
         <asp:RadioButtonList ID="Review_Star_Select" runat="server" AutoPostBack="True" OnSelectedIndexChanged="Select_OnSelectedIndexChanged" RepeatDirection="Horizontal">
           <asp:ListItem Value="" Selected="True">所有评价</asp:ListItem>
           <asp:ListItem Value="1">所有好评</asp:ListItem>
           <asp:ListItem Value="0">所有中评</asp:ListItem>
           <asp:ListItem Value="-1">所有差评</asp:ListItem>
         </asp:RadioButtonList> 
     </div>
     
     <asp:GridView ID="GridViewReview" runat="server" AutoGenerateColumns="False" CssClass="ReviewListStyle" EnableViewState="false" BorderWidth="0" Width="100%">
            <Columns>
               <asp:TemplateField HeaderText="评价标题" HeaderStyle-Width="30%">
                  <ItemTemplate>
                     <asp:Literal ID="Label7" runat="server" Text='<%# Eval("ReviewTitle") %>' /> 
                  </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText="评价人" HeaderStyle-Width="15%">
                  <ItemTemplate>
                       <asp:HyperLink ID="HyperLink1" Text='<%# Eval("UserName") %>' NavigateUrl='<%#"Shop_ShopIntro.aspx?UserID="+Eval("UserID")%>' Target="_blank" runat="server" />
                  </ItemTemplate>
               </asp:TemplateField>
               <asp:TemplateField HeaderText="评价内容">
                  <ItemTemplate>
                     <asp:Literal ID="Label7" runat="server" Text='<%# Eval("ReviewContent") %>' /> 
                  </ItemTemplate>
               </asp:TemplateField>
            </Columns>
            <EmptyDataTemplate>
               <div style="text-align:center; list-style:30px; height:30px;">暂无评价！</div>
            </EmptyDataTemplate>
            <AlternatingRowStyle CssClass="ReviewAlterStyle" />
         </asp:GridView>
         
     <br />
     
</div> 
    <asp:ObjectDataSource ID="ReviewDataSource" runat="server" SelectMethod="GetbargainorReviewCount" TypeName="MallZ.Data.Shop_Review" >
        <SelectParameters>
            <asp:Parameter Name="UserID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:ObjectDataSource ID="ReviewDataSource0" runat="server" SelectMethod="GetpurchaserReviewCount" TypeName="MallZ.Data.Shop_Review">
        <SelectParameters>
            <asp:Parameter Name="UserID" Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    
<script type="text/javascript">setButtonActive();</script>
</asp:Content>

