<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopReviewManage, HoWaveVGO" title="商城评价管理" enableEventValidation="false" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<script src="Js/Function.js" type="text/javascript"></script> 
<script type="text/javascript">
function showsearchdate()
{
  var objdate=document.getElementById('showdate');
  objdate.style.display=objdate.style.display=="none"?"":"none";
  document.getElementById('ctl00_ContentPlaceHolder1_TxtBeginDate').value='';
  document.getElementById('ctl00_ContentPlaceHolder1_TxtEndDate').value='';
  
}

</script>
<table class="adminheading" width="100%">
    <tr>
            <th class="user" align="left">评价管理</th>
            <td align="right"></td>
    </tr>
</table>
    
    <table class="nick"><tr><td colspan="4" class="tit">快速查找</td></tr>
    <tr><td class="ltd">高级查找：</td><td class="rtd" style="width:35%"><asp:DropDownList ID="QuickSearch" runat="server" OnSelectedIndexChanged="QuickSearch_SelectedIndexChanged" AutoPostBack="true">
          <asp:ListItem Text="今天的所有评价" Value="today" />
          <asp:ListItem Text="近一周的所有评价" Value="week" />
          <asp:ListItem Text="所有有效的评价" Value="legal" />
          <asp:ListItem Text="所有无效的评价" Value="illegal" />
          <asp:ListItem Text="所有卖方好评" Value="salergood" />
          <asp:ListItem Text="所有卖方中评" Value="salercom" />
          <asp:ListItem Text="所有卖方差评" Value="salerbad" />
          <asp:ListItem Text="所有买方好评" Value="buyergood" />
          <asp:ListItem Text="所有买方中评" Value="buyercom" />
          <asp:ListItem Text="所有买方差评" Value="buyerbad" /> 
          
        <%--  <asp:ListItem Text="评价次数最多的商品" Value="product_review_most" />
          <asp:ListItem Text="评价最好的10个买家" Value="buyer_review_best_top10" />
          <asp:ListItem Text="评价最差的10个买家" Value="buyer_rview_weak_top10" />
          <asp:ListItem Text="评价最好的10个卖家" Value="saler_review_best_top10" />
          <asp:ListItem Text="评价最差的10个卖家" Value="saler_rview_weak_top10" />--%>
       </asp:DropDownList>
    </td>
        <td class="ltd">快速查找：</td><td class="rtd" style="width:35%"><asp:DropDownList ID="DetailSearchType" runat="server">
          <asp:ListItem Text="评价人用户名" Value="reviewer" />
          <asp:ListItem Text="被评价人用户名" Value="review_to" />
          <asp:ListItem Text="评价标题" Value="title" />
          <asp:ListItem Text="评价内容" Value="content" />
       </asp:DropDownList>
       <asp:TextBox ID="DetailSearchText" runat="server"  Width="80px" />
       <asp:CheckBox Text="日期" runat="server" AutoPostBack="false"  ID="SelectDate"/>
       </td></tr>

       <tr id="showdate" style="display:none;"><td class="ltd">终止日期：</td><td class="rtd" style="width:35%"><asp:TextBox ID="TxtBeginDate" runat="server" Width="90px"/>
            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ErrorMessage="2001-01-01"
          ControlToValidate="TxtBeginDate" ValidationExpression="\d{4}-(\d){1,2}-(\d){1,2}"/> </td>
          <td class="ltd">终止日期：</td><td class="rtd" style="width:35%"><asp:textbox ID="TxtEndDate" runat="server"  Width="90px"/>
           <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ErrorMessage="2001-01-01" ControlToValidate="TxtEndDate" ValidationExpression="\d{4}-(\d){1,2}-(\d){1,2}"/></td></tr>
       <tr><td colspan="4"><div align="center"><asp:Button  Text="查找评价" runat="server" ID="DetailSearchButton" OnClick="DetailSearchButton_Click" Width="60"/></div></td></tr>
   </table><br />

   <asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="False"
          DataKeyNames="ReviewsID"  Width="100%" CssClass="adminlist"  AllowPaging="false">
        <Columns>
             <asp:TemplateField  HeaderText="选中" ItemStyle-Width="30" >
               <ItemTemplate>
                  <asp:CheckBox ID="Select_Review" runat="server" />
               </ItemTemplate>
               <HeaderStyle Width="30" />            
            </asp:TemplateField>        
            <asp:BoundField DataField="ReviewsID" HeaderText="编号">
                <HeaderStyle Width="10%" />
            </asp:BoundField>
            <asp:HyperLinkField DataTextField="ProductName" ItemStyle-HorizontalAlign="Left" DataNavigateUrlFields="ProductID" HeaderText="商品名称" DataNavigateUrlFormatString="../Shop/Auction/Auction.aspx?ProductID={0}" Target="_blank" >
                </asp:HyperLinkField>
            <asp:BoundField DataField="UserName" HeaderText="评价人" >
                <HeaderStyle Width="10%" />
            </asp:BoundField>
            <asp:TemplateField  HeaderText="被评价人" >
               <ItemTemplate>
                  <asp:HyperLink ID="ReviewsTo" runat="server" Text='<%# Eval("ReviewerName") %>' NavigateUrl='<%# "Admin_UserDetail.aspx?UserID="+Eval("ReviewerID") %>'  />
                  <asp:HiddenField ID="ReviewsToID" runat="server" Value='<%# Eval("ReviewerID") %>' />
               </ItemTemplate>
               <HeaderStyle Width="10%" />            
            </asp:TemplateField> 
            <asp:TemplateField  HeaderText="标题" >
               <ItemTemplate>
                  <asp:HyperLink ID="Title" runat="server" Text='<%# Eval("ReviewTitle") %>' NavigateUrl="#" ToolTip='<%# Eval("ReviewContent") %>' />
               </ItemTemplate>
               <HeaderStyle Width="20%" />            
            </asp:TemplateField>           
            <asp:BoundField DataField="ReviewStar" HeaderText="评价"  >
                <HeaderStyle Width="10%" />
            </asp:BoundField>
            <asp:BoundField DataField="ReviewDate" HeaderText="日期"  >
                <HeaderStyle Width="10%" />
            </asp:BoundField>            
        </Columns> 
        <EmptyDataTemplate>
                <tr>
                    <th>选中</th>
                    <th>编号</th>
                    <th>商品</th>
                    <th>评价人</th>
                    <th>被评价人</th>
                    <th>标题</th>
                    <th>评价</th>
                    <th>日期</th>
                </tr>
                <tr><td colspan="8">暂无信息！</td></tr>
        
        </EmptyDataTemplate>
   </asp:GridView>
       <div style="padding:10px;" align="center">
        <asp:Literal ID="ItemCount" runat="server" />
        <asp:Literal ID="CurrentPage" runat="server" />
        <asp:HiddenField ID="H_CurrentPage" runat="server" Value="0"/>
        <asp:HiddenField ID="H_SearchType" runat="server" Value="0"/>
        <asp:LinkButton ID="First" runat="server" CommandArgument="first" OnClick="PagerButton_Click">首 页</asp:LinkButton>
        <asp:LinkButton ID="Prev" runat="server" CommandArgument="prev" OnClick="PagerButton_Click">上一页</asp:LinkButton>
        <asp:LinkButton ID="Next" runat="server" CommandArgument="next" OnClick="PagerButton_Click">下一页</asp:LinkButton>
        <asp:LinkButton ID="Last" runat="server" CommandArgument="last" OnClick="PagerButton_Click">尾 页</asp:LinkButton>
              到第<asp:TextBox ID="GoToPage" Width="20px" runat="server" />页<asp:Button ID="GoPageBtn" Text="确定" runat="server" OnClick="GoToPageBtn_Click" />
    </div>
    <div style="width:100%; text-align:center;">
       <div style="float:left"><input id="chkAll" onclick="SelectAllCheckboxes(this);" runat="server" type="checkbox" />选中本页所有评价</div>
       <div style="float:inherit">
          <asp:Button ID="deleteButton" runat="server" Text="删除评价并扣除评分" CommandName="delete_substract" OnCommand="ReviewButton_OnCommon" OnClientClick="return confirm('确定删除评价,并扣除被被评价人的评分!')"/>
          <asp:Button ID="Button1" runat="server" Text="删除评价不扣评分" CommandName="delete" OnCommand="ReviewButton_OnCommon" OnClientClick="return confirm('确定删除评价,但不扣除被被评价人的评分!')"/>        
          <asp:Button ID="illegalButton" runat="server" Text="设为无效评价" CommandName="illegal" OnCommand="ReviewButton_OnCommon" OnClientClick="return confirm('设为无效评价后,并扣除被被评价人的评分!')"/>
          <asp:Button ID="legalButton" runat="server" Text="设为有效评价" CommandName="legal" OnCommand="ReviewButton_OnCommon" OnClientClick="return confirm('设为有效评价后,并增加被被评价人的评分!')"/>
         <%-- <asp:Button ID="modifyButton" runat="server" Text="批量修改评价" CommandName="modify" OnCommand="ReviewButton_OnCommon" />--%>
      </div>
    </div>
<br />

<script type="text/javascript" src="Js/getdate.js"></script>


</asp:Content>
