<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopComplain, WebApp_deploy" title="投诉处理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <script type="text/javascript">
      
       function SetNewColor(source,source1)
       { 
          source.style.position="absolute";
          source.style.display="";

       }
       function SetOldColor(source,source1)
       { 
           source.style.display="none";
       }
       
       function SetNewColor1(source,source1)
       { 
           source.style.display="block";
       }
       function SetOldColor1(source,source1)
       { 
          source.style.display="none";
           
       }
    </script>

<table class="adminheading" width="100%">
    <tr>
        <th class="user" align="left" style="width: 19%;">投诉/举报管理</th>
        <td align="right">
        </td>
        <td class="rtdw"></td>
   </tr>
</table>
 
<asp:Panel ID="sreachbar" runat="server">
    <table class="nick">
    <tr><td class="ltd">类型：</td><td class="rtd" style="width:35%">
            <asp:DropDownList ID="DropType1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropType1_Change" >
                <asp:ListItem Value="-1">投诉／举报</asp:ListItem>
                <asp:ListItem Value="0">投诉</asp:ListItem>
                <asp:ListItem Value="1">举报</asp:ListItem>
              </asp:DropDownList></td>
             <td class="ltd">状态：</td><td class="rtd" style="width:35%">
             <asp:DropDownList ID="DropStatus1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropStatus1_Change" >
                 <asp:ListItem Value="-1">处理状态</asp:ListItem>
                 <asp:ListItem Value="0">等待处理</asp:ListItem>
                 <asp:ListItem Value="1">处理完毕</asp:ListItem>
             </asp:DropDownList>          
             <asp:DropDownList ID="DropStartTime1" runat="server" AutoPostBack="True" OnSelectedIndexChanged="DropStartTime1_Change" >
                 <asp:ListItem Value="0">查看近期记录</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="salername" runat="server" AutoPostBack="True" Width="120" OnTextChanged="salername_Change"/> </td>
            <td class="ltd">用户列表：</td><td class="rtd" style="width:35%"><asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                 DataTextField="username" DataValueField="userid" OnSelectedIndexChanged="DropDownList1_Change" >
                <asp:ListItem Selected="True" Value="0">所有</asp:ListItem>
            </asp:DropDownList></td></tr>
        </table>
</asp:Panel>
        
       <asp:GridView  CssClass="adminlist" ID="GridView2" runat="server" AllowPaging="True" AutoGenerateColumns="False"  
              OnDataBound="GridView2_DataBound" PageSize="20" EnableTheming="False" 
              OnRowDataBound="GridView2_RowDataBound" DataKeyNames="ComplainID" 
             OnSelectedIndexChanged="GridView2_SelectedIndexChanged" EnableViewState="False">                               
                <Columns>
                    <asp:BoundField DataField="ComplainID" HeaderText="编号" /> 
                    <asp:HyperLinkField DataNavigateUrlFields="UserID" DataNavigateUrlFormatString="Admin_UserDetail.aspx?UserID={0}" HeaderText="投诉／举报人"  DataTextField="UserName"/> 
                    <asp:HyperLinkField DataNavigateUrlFields="ComplainUserID" DataNavigateUrlFormatString="Admin_UserDetail.aspx?UserID={0}" HeaderText="被投诉／举报人"  DataTextField="ComplainUserName"/>
                    <asp:BoundField DataField="ComplainType" HeaderText="类型"/>
                    <asp:TemplateField HeaderText="处理结果">
                        <ItemTemplate>
                            <asp:Literal ID="litstatus" runat="server" Text='<%#(Eval("status").ToString()=="True")?"已处理":"未处理" %>' />
                        </ItemTemplate>
                    </asp:TemplateField>              
                    <asp:TemplateField HeaderText="投诉原因">    
                        <ItemTemplate>
                            <asp:Label ID="Label5" runat="server"  Text="显示详细"/>
                            <asp:Label ID="Label3" style="position:absolute; background-color:White; padding:5px; text-align:left; border:1px #ccc solid; width:300px;display:none;" runat="server"  Text='<%# Bind("reason") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>                    
                    <asp:TemplateField HeaderText="处理结果">                         
                        <ItemStyle Width="20%" />
                        <ItemTemplate>
                              <asp:Label ID="Label6"  runat="server"  Text="显示详细"></asp:Label><br />
                              <asp:Label ID="Label4" style="position:absolute; background-color:White; height:100px; padding:5px; text-align:left; border:1px #ccc solid; width:300px;display:none;" runat="server" Text='<%# Bind("result") %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="StartTime" HeaderText="日期" />
                    <asp:HyperLinkField DataNavigateUrlFields="ComplainID" DataNavigateUrlFormatString="?ReviewComplainID={0}"
                        HeaderText="处理" Text="填写处理结果" />
                        <asp:TemplateField HeaderText="删除" >
                          <ItemTemplate>
                            <asp:LinkButton ID="cl" runat="server" CommandName="Delete" OnClientClick="if(confirm('确定删除吗？'))return true;return false;" Text="删除" />
                          </ItemTemplate>
                        </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                        <tr>
                            <th>编号</th>
                            <th>投诉／举报人</th>
                            <th>被投诉／举报人</th>
                            <th>投诉类型</th>
                            <th>处理状态</th>
                            <th>投诉原因</th>
                            <th>处理结果</th>
                            <th>日期</th>
                            <th>操作</th>
                        </tr>
                        <tr><td colspan="9">暂无信息！</td></tr>
                
                </EmptyDataTemplate>
             </asp:GridView>
              
              <div class="page">
              <asp:Label ID="PagePanel" runat="server" />
              </div>
              
              <div class="div_btm">               
                  <asp:Panel ID="Panel1" runat="server"   Width="639px">
                   处理结果：<asp:TextBox ID="TextBox1" runat="server" Height="69px" Width="623px" TextMode="MultiLine"/><br />
                      <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="提交" />
                      <input value="取消" type="button" onclick="history.back()" />
                      <asp:RequiredFieldValidator ID="rv" runat="server" ErrorMessage="请输入内容！" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
                  </asp:Panel>
             </div>
             
             
</asp:Content>

