<%@ page language="C#" masterpagefile="~/Member/MyShopMasterPage.master" autoeventwireup="true" inherits="Member_Shop_TryCommentManage, WebApp_deploy" title="无标题页" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript">

       function Allselect1() {
           var GetCheckBox = document.getElementsByTagName('input');
           for (var i = 0; i < GetCheckBox.length; i++) {
               if (GetCheckBox[i].type == "checkbox") {
                   GetCheckBox[i].checked = true;
               }
           }
       }

       function AllNotSelect1() {
           var GetCheckBox = document.getElementsByTagName('input');
           for (var i = 0; i < GetCheckBox.length; i++) {
               if (GetCheckBox[i].type == "checkbox") {
                   GetCheckBox[i].checked = false;
               }
           }
       }
   </script>
   
  <asp:Panel runat="server" ID="Panel1">
     <div class="pageTitle">使用活动评论</div>
       <asp:Repeater ID="Repeater1" runat="server">
        <HeaderTemplate>
            <table class="tableHead">
                <tr>
                   <th style=" width:25%">类别</th>
                   <th style=" width:40%">活动名称</th>
                   <th style=" width:15%">评论统计</th>
                   <th style=" width:20%">操作</th>
                </tr>
            </table>
        </HeaderTemplate>
        <ItemTemplate>
            <table class="tableHead" border="1" style="color: Black; border-collapse: collapse;">
                <tr>
                    <td style=" width:25%"><%#ShowClass(Eval("ClassID").ToString())%></td>
                    <td style=" width:40%"><a target="_blank" href="../Try/ShowMytestProduct.aspx?ProductID=<%#Eval("TryID") %>"><%#Eval("ProductName") %></a></td>
                    <td style=" width:15%"> <%#GetCommentQuantity(Eval("TryID").ToString()) %></td>
                    <td style=" width:20%" class="Fbtn"><a href="Shop_TryCommentManage.aspx?ProductID=<%#Eval("TryID") %>&tag=Show">查看评论</a></td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:Repeater>
      <table class="tableHead">
          <tr>
             <td>
                <asp:Label ID="lbPage" runat="server" Text=""></asp:Label>
              </td>
          </tr>
       </table>
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" Visible="false">
        <div class="pageTitle">用户评论</div>
       <asp:Repeater ID="Repeater2" runat="server">
        <HeaderTemplate>
            <table class="tableHead">
                <tr>
                   <th style="width:8%">选择</th>
                   <th style=" width:17%">活动标题</th>
                   <th style=" width:15%">用户名</th>
                   <th style=" width:30%">内容</th>
                   <th style=" width:10%">评论时间</th>
                   <th style=" width:10%">评论状态</th>
                   <th style=" width:10%">操作</th>
                </tr>
            </table>
        </HeaderTemplate>
        <ItemTemplate>
            <table class="tableHead" border="1" style="color: Black; border-collapse: collapse;">
                <tr>
                    <td style=" width:8%">
                          <asp:CheckBox ID="CheckBox1" runat="server" />
                        <asp:HiddenField ID="HidCommentID" runat="server" Value='<%#Eval("CommentID") %>' />
                    </td>
                    <td style=" width:17%"><%#ShowProductName(Eval("ProductID").ToString())%></td>
                    <td style=" width:15%"><%#ShowUserName(Eval("UserID").ToString())%></td>
                    <td style=" width:30%"><%#Eval("Content") %></td>
                    <td style=" width:10%"><%#Eval("CreateTime")%></td>
                    <td style=" width:10%"><%#ShowStatus(Eval("CommentID").ToString())%></td>
                    <td style=" width:10%">
                        <asp:LinkButton ID="LbtAudit" runat="server" OnClick="LbtAudit_Click" OnClientClick=" return confirm('确定审核通过？')">通过审核</asp:LinkButton>|
                        <asp:LinkButton ID="LbtDel" runat="server" OnClick="LbtDel_Click" OnClientClick=" return confirm('确定删除？')">删除</asp:LinkButton>
                        </td>
                </tr>
            </table>
        </ItemTemplate>
    </asp:Repeater>
      <table class="tableHead">
          <tr>
          <td style="text-align:center">
          <input id="Allselect" type="button" onclick="Allselect1()" value="全选" />
          <input id="NotAllselect" type="button" onclick="AllNotSelect1()" value="反选" />
           <asp:Button ID="BatchAudit" runat="server" Text="批量审核" 
                     onclick="BatchAudit_Click"  />  
                 <asp:Button ID="BatchDel" runat="server" Text="批量删除" 
                     onclick="BatchDel_Click" />
          </td>
          </tr>
          <tr>
             <td>
                <asp:Label ID="lbPage2" runat="server" Text=""></asp:Label>
              </td>
          </tr>
       </table>
    </asp:Panel>
</asp:Content>

