<%@ page language="C#" masterpagefile="MyShopMasterPage.master" autoeventwireup="true" inherits="Shop_Member_shop_review, WebApp_deploy" title="信用评价" enableviewstate="false" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">
function setButtonActive()
{
   var _flag=parseInt(<%=m_flag %>);
   var ulObj=document.getElementById("M1");  
   for(var i=0;i<ulObj.childNodes.length;i++)
     ulObj.childNodes[i].className="";
   if(ulObj.childNodes.length>5)
     {_flag=_flag*2+1;} 
    ulObj.childNodes[_flag].className="active";  

}
</script>
 <div class="pageTitle">我的评价</div>
 <div style="width:98%">
    <div style="float:left; width:200px; height:350px; margin:5px;">
      <table  class="tableHead" style="height:345px">
         <tr>
             <th>个人信息</th>
         </tr>
          <tr>
             <td  style="background:#F8F8F8; padding:5px;">
               
               卖家好评率： <asp:Label ID="Labwellpurchaserperson" runat="server"  CssClass="font_orange_14" /><br />
               买家好评率： <asp:Label ID="Labwellbargainorperson" 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="BuyerReviewNums" runat="server" />      
        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataSourceID="ReviewDataSource0"
            OnDataBound="GridView2_DataBound" CssClass="tableHead" RowStyle-HorizontalAlign="Center" >
            <Columns>
                <asp:TemplateField HeaderText="等级">                
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# Bind("StarImageURL") %>' />
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Star") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Nearweek" HeaderText="最近一个星期" />
                <asp:BoundField DataField="NearMonth" HeaderText="最近一个月" />
                <asp:BoundField DataField="NearSixMonth" HeaderText="最近六个月" />
                <asp:BoundField DataField="PreSixMonth" HeaderText="六个月前" />
                <asp:BoundField DataField="CountStar" HeaderText="总计" />
            </Columns>         
        </asp:GridView>
         <br />
        <asp:HyperLink ID="SalerReviewUrl" runat="server" Text="&nbsp;买家信用度" Target="_blank"/>
        <asp:Label ID="SalerReviewNums" runat="server" />  
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="ReviewDataSource"
            OnDataBound="GridView1_DataBound"  CssClass="tableHead" RowStyle-HorizontalAlign="Center">
            <Columns>
                <asp:TemplateField HeaderText="等级">             
                    <ItemTemplate>
                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# Bind("StarImageURL") %>' />
                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("Star") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="Nearweek" HeaderText="最近一个星期" />
                <asp:BoundField DataField="NearMonth" HeaderText="最近一个月" />
                <asp:BoundField DataField="NearSixMonth" HeaderText="最近六个月" />
                <asp:BoundField DataField="PreSixMonth" 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="allReview" OnCommand="ShowReview"  Text="所有评价" /></li>  
          <li><asp:LinkButton ID="buyer_review" runat="server" CommandName="buyerReview" OnCommand="ShowReview"  Text="买家评价" /></li> 
          <li><asp:LinkButton ID="saler_review" runat="server" CommandName="salerReview" OnCommand="ShowReview" Text="卖家评价" /></li> 
          <li><asp:LinkButton ID="my_review_buyer" runat="server" CommandName="myReview_buyer" OnCommand="ShowReview"  Text="给卖家评价" /></li> 
          <li><asp:LinkButton ID="my_review_saler" runat="server" CommandName="myReview_saler" OnCommand="ShowReview"  Text="给买家评价" /></li> 
        </ul>
     </div>
     <div class="TabText">
         <asp:RadioButtonList ID="Review_Star_Select" runat="server" AutoPostBack="True"  OnSelectedIndexChanged="Review_Star_Select_SelectedIndexChanged" RepeatDirection="Horizontal">
           <asp:ListItem Value="-2" 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%" OnDataBound="GridViewReview_DataBound">
            <Columns>
               <asp:TemplateField >
                  <ItemTemplate>
                     <img src='<%# Eval("ReviewStarImageURL") %>' />
                    <span><asp:Literal ID="ReviewStar" runat="server" Text='<%# Eval("NickReviewStar") %>' /></span>
                    <asp:HyperLink ID="ModifyReview" runat="server" Visible="false" Text="修改" NavigateUrl='<%# "Shop_AddReview.aspx?Action=modify&ReviewsID="+Eval("ReviewsID") %>' />
                    <asp:HiddenField ID="ModifyUpdate" runat="server" Value='<%# Eval("ReviewUpdateTimes") %>' />
                  </ItemTemplate> 
                  <HeaderStyle Width="20%" />                 
               </asp:TemplateField>
               
               <asp:TemplateField HeaderText="评价人">
                  <ItemTemplate>
                      <asp:Literal ID="Label8" runat="server" Text='<%# Eval("PurchaserBargainorSize ") %>'/>：　
                       <asp:HyperLink ID="HyperLink1" Text='<%# Eval("UserName") %>' NavigateUrl='<%#"Shop_ShopIntro.aspx?UserID="+Eval("userID")%>' Target="_blank" runat="server" />
                        
                  </ItemTemplate>
                  <HeaderStyle Width="20%" /> 
               </asp:TemplateField>
               <asp:TemplateField HeaderText="商品名称">
                  <ItemTemplate>
                      <asp:HyperLink ID="ProductName" Text='<%# Eval("ProductName") %>' NavigateUrl='<%#"../Auction/Auction.aspx?ProductID="+Eval("ProductID")%>' Target="_blank" runat="server"  /><br />                    
                      <asp:Label ID="ProductPrice" runat="server" Text='<%# Eval("ProductPrice")+"元" %>' ForeColor="orangered"/>&nbsp;
                  </ItemTemplate>
                  <HeaderStyle Width="30%" /> 
               </asp:TemplateField>
               <asp:TemplateField HeaderText="评价内容">
                  <ItemTemplate>
                     <asp:Literal ID="Label7" runat="server" Text='<%# Eval("ReviewContent") %>' /> 
                  </ItemTemplate>
                   <HeaderStyle Width="30%" /> 
               </asp:TemplateField>
            </Columns> 
            <AlternatingRowStyle CssClass="ReviewAlterStyle" />
            <EmptyDataTemplate>
               <div style="text-align:center; list-style:30px; height:30px;">暂无评价！</div>
            </EmptyDataTemplate>
         </asp:GridView>
     <br />
     
</div> 
 <asp:ObjectDataSource ID="ReviewDataSource" runat="server" SelectMethod="GetbargainorReviewCount"
        TypeName="HoWave.Web.Shop_Review" >
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="UserID" SessionField="Howave_UserID"  Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
     <asp:ObjectDataSource ID="ReviewDataSource0" runat="server" SelectMethod="GetpurchaserReviewCount"
        TypeName="HoWave.Web.Shop_Review">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="UserID" SessionField="Howave_UserID"  Type="Int32" />
        </SelectParameters>
    </asp:ObjectDataSource>
    <asp:HiddenField ID="H_Review_Type" runat="server"  Value="-1"/>
    <asp:HiddenField ID="H_Review_Star" runat="server" Value="-2" />
    <asp:HiddenField ID="H_Review_UserID" runat="server"  />
    <asp:HiddenField ID="H_Review_ReviewerID" runat="server" />
    <asp:HiddenField ID="H_SelectType" runat="server" />
<script type="text/javascript">setButtonActive();</script>
</asp:Content>

