<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopMessage, HoWaveVGO" title="留言管理页面" enableEventValidation="false" %>
<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="tit" colspan="4">商城留言管理</td></tr>                  
     <tr>
        <td class="ltd">
            状态：</td>
        <td class="rtd" style="width:35%">
        <asp:DropDownList ID="DroStatus" runat="server">
              <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">
             <asp:ListItem Value="0">商品留言</asp:ListItem>
             <asp:ListItem Value="1">店铺留言</asp:ListItem>
             <asp:ListItem Value="2">求购留言</asp:ListItem>
             <asp:ListItem Value="-1">全部</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 colspan="4" ><div align="center">                        
         <asp:Button ID="ImgButSearch" runat="server" Text="查询" OnClick="ImgButSearch_Click" />  </div>
        </td>
     </tr>
  </table><br /> 
       <asp:GridView  PageSize="15"  CssClass="adminlist" ID="GVReviewMan" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataKeyNames="M_ID"  DataSourceID="MessageSource" 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="80" />
                <asp:BoundField DataField="m_typename" HeaderText="类型" SortExpression="ReviewTitle" ItemStyle-Width="60" />
                <asp:BoundField DataField="M_Content" HeaderText="内容" SortExpression="ReviewContent" ItemStyle-HorizontalAlign="Left" />
                <asp:BoundField DataField="M_DateTime" HeaderText="日期" SortExpression="ReviewDate" ItemStyle-Width="60"  />
                <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>  
     <asp:ObjectDataSource ID="MessageSource" runat="server" SelectMethod="GetMessageByGetMessageByStatusContentBDateEDateProductyIDShopIDType"
             TypeName="Shop_Message" OldValuesParameterFormatString="{0}" UpdateMethod="GetMessageByGetMessageByStatusContentBDateEDateProductyIDShopIDType">
            <SelectParameters>
                <asp:ControlParameter ControlID="DroStatus" DefaultValue="-1" Name="M_Status" PropertyName="SelectedValue"
                    Type="String" />
                <asp:Parameter  DefaultValue="" Name="M_Content"  Type="String" />
                <asp:ControlParameter ControlID="TxtBeginDate" DefaultValue="2000-01-01" Name="M_BeginDate"
                    PropertyName="Text" Type="String" />
                <asp:ControlParameter ControlID="TxtEndDate" DefaultValue="2100-01-01" Name="M_EndDate"
                    PropertyName="Text" Type="String" />
                <asp:Parameter DefaultValue="-1" Name="M_ProductID" Type="Int32" />
                <asp:Parameter DefaultValue="-1" Name="M_ShopID" Type="Int32" />
                <asp:ControlParameter ControlID="DroType" DefaultValue="-1" Name="M_Type" PropertyName="SelectedValue"
                    Type="Int32" />
            </SelectParameters>
         <UpdateParameters>
             <asp:Parameter Name="M_Status" Type="String" />
             <asp:Parameter Name="M_Content" Type="String" />
             <asp:Parameter Name="M_BeginDate" Type="String" />
             <asp:Parameter Name="M_EndDate" Type="String" />
             <asp:Parameter Name="M_ProductID" Type="Int32" />
             <asp:Parameter Name="M_ShopID" Type="Int32" />
             <asp:Parameter Name="M_Type" Type="Int32" />
         </UpdateParameters>
     </asp:ObjectDataSource>       
       
</asp:Content>

