<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopMessage, WebApp_deploy" title="留言管理页面" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script type="text/javascript" src="js/getdate.js"></script>

 <table class="adminheading">
     <tr>
        <th valign="middle" class="templates"  align="left">商城留言管理</th>                  
        <td style="text-align:right; padding-right:10px;">
            
        </td>
     </tr>
  </table> 

<table class="nick">
     <tr>
        <td class="ltd">状态：</td>
        <td class="rtd" style="width:35%">
        <asp:DropDownList ID="DroStatus" runat="server" AutoPostBack="true" OnSelectedIndexChanged="DownList_OnChange">
              <asp:ListItem Value="0">未读</asp:ListItem>
              <asp:ListItem Value="1">已读</asp:ListItem>
              <asp:ListItem Value="-1">全部</asp:ListItem>
        </asp:DropDownList>
        </td>
         <td class="ltd">类型：</td>
         <td class="rtd" style="width:35%"><asp:DropDownList ID="DroType" runat="server"  AutoPostBack="true" OnSelectedIndexChanged="TypeDownList_OnChange">
             <asp:ListItem Value="-1">全部留言</asp:ListItem>
             <asp:ListItem Value="0">商品留言</asp:ListItem>
             <asp:ListItem Value="1">店铺留言</asp:ListItem>
             <asp:ListItem Value="2">求购留言</asp:ListItem>
          </asp:DropDownList></td></tr><tr>
        <td class="ltd">开始日期：</td><td class="rtd" style="width:35%"><asp:TextBox ID="TxtBeginDate" runat="server" Width="75px"/></td>
        <td class="ltd">终止日期：</td><td class="rtd" style="width:35%"><asp:TextBox ID="TxtEndDate" runat="server" Width="82px"/></td>
        </tr><tr><td class="btm" colspan="4">
         <asp:Button ID="ImgButSearch" runat="server" Text="查询" OnClick="ImgButSearch_Click" />
        </td>
     </tr>
  </table>
       <asp:GridView  PageSize="15"  CssClass="adminlist" ID="GVReviewMan" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataKeyNames="M_ID" OnRowDataBound="GridView1_RowDataBound" OnSelectedIndexChanged="GVReviewMan_SelectedIndexChanged" >
             <Columns>
               <asp:BoundField DataField="M_ID" HeaderText="编号" InsertVisible="False" ReadOnly="True" SortExpression="ReviewsID" ItemStyle-Width="30" />
                <asp:BoundField DataField="UserName" HeaderText="用户名" SortExpression="UserName" ItemStyle-Width="100" />
                <asp:BoundField DataField="M_Type" HeaderText="类型" SortExpression="ReviewTitle" ItemStyle-Width="60" />
                <%--<asp:BoundField DataField="M_Content" HeaderText="内容" SortExpression="ReviewContent" ItemStyle-HorizontalAlign="Left" />--%>
                <asp:TemplateField HeaderText="内容" SortExpression="ReviewContent">
                <ItemTemplate>
                <asp:Label ID="lblContent" runat="server" Text='<%#Eval("M_Content") %>'></asp:Label>
                <asp:HiddenField ID="hfContent" runat="server" Value='<%#Eval("M_Content") %>' />
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Left" />                
                </asp:TemplateField>                
                <asp:BoundField DataField="M_DateTime" HeaderText="日期" SortExpression="ReviewDate" ItemStyle-Width="100"  />
                <asp:BoundField DataField="M_Status" HeaderText="状态" ItemStyle-Width="40"  />
                
                <asp:TemplateField HeaderText="删除" HeaderStyle-Width="40">
                  <ItemTemplate>
                    <asp:LinkButton ID="cl" runat="server" Text="删除" CommandName="Select" OnClientClick="if(confirm('确定删除吗？'))return true;return false;" />
                  </ItemTemplate>
                </asp:TemplateField>
             </Columns>
             <EmptyDataTemplate>
                    <tr>
                       <th>编号</th>
                       <th>状态</th>
                       <th>日期</th>
                       <th>用户名</th>
                       <th>类型</th>
                       <th>内容</th>
                       <th>删除</th>
                    </tr>
                    <tr><td colspan="7">暂无留言！</td></tr>
             </EmptyDataTemplate>                 
     </asp:GridView>  
     
     <div class="page">
       <asp:Label ID="PagePanel" runat="server" />
     </div>
     
</asp:Content>

