<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_ShopComplain, HoWaveVGO" 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 colspan="4" class="tit">快速查找</td></tr>
    <tr><td class="ltd">类型：</td><td class="rtd" style="width:35%"><asp:DropDownList ID="DropType1" runat="server" AutoPostBack="True" >
                <asp:ListItem Value="-1">投诉／举报</asp:ListItem>
                <asp:ListItem Value="投诉">投诉</asp:ListItem>
                <asp:ListItem Value="举报">举报</asp:ListItem>
              </asp:DropDownList></td>
        <td class="ltd">状态：</td><td class="rtd" style="width:35%"><asp:DropDownList ID="DropStatus1" runat="server" AutoPostBack="True" >
                 <asp:ListItem Value="状态">状态</asp:ListItem>
                 <asp:ListItem Value="0">待处理</asp:ListItem>
                 <asp:ListItem Value="1">处理完毕</asp:ListItem>
             </asp:DropDownList>          
             <asp:DropDownList ID="DropStartTime1" runat="server" AutoPostBack="True" >
                 <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="80"/> </td>
    <td class="ltd">用户列表：</td><td class="rtd" style="width:35%"><asp:DropDownList ID="DropDownList1" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                 DataSourceID="ObjectDataSource2" DataTextField="username" DataValueField="userid" >
                <asp:ListItem Selected="True" Value="-1">所有</asp:ListItem>
            </asp:DropDownList></td></tr>
        </table><br />
        </asp:Panel>
       <asp:GridView  CssClass="adminlist" ID="GridView2" runat="server" AllowPaging="True" AutoGenerateColumns="False"  
             DataSourceID="ComplainSource2" Width="100%" 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="complainedname"/>   
                    <asp:BoundField DataField="ComplainType" HeaderText="类型"/>
                    <asp:BoundField DataField="statusname" HeaderText="处理状态" />                       
                    <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>
                              <asp:Label ID="Label4"  style="position:absolute; background-color:White; 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>
              
              <br />
              <div style="clear:both">               
                  <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="提交" />
                      <asp:Button ID="Button2"  runat="server" OnClick="Button2_Click" Text="取消" CausesValidation="false" />
                      <asp:RequiredFieldValidator ID="rv" runat="server" ErrorMessage="请输入内容！" ControlToValidate="TextBox1"></asp:RequiredFieldValidator>
                  </asp:Panel>
             </div>
   
 
 
 <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" SelectMethod="GetUserLikeUserName"  TypeName="UserBLL">
     <SelectParameters>
        <asp:ControlParameter ControlID="salername" Name="UserName" PropertyName="Text" Type="String" DefaultValue="" />
     </SelectParameters>
</asp:ObjectDataSource>
 
<asp:ObjectDataSource ID="ComplainSource2" runat="server"  SelectMethod="GetComplainByStatusUserIDComplainUserIDLatelyDateComplainType"
                  TypeName="Shop_Complain" UpdateMethod="GetComplainByStatusUserIDComplainUserIDLatelyDateComplainType" DeleteMethod="DeleteComplain">
      <SelectParameters>
          <asp:ControlParameter ControlID="DropStatus1" DefaultValue="状态" Name="Status" PropertyName="SelectedValue"
              Type="String" />
          <asp:ControlParameter ControlID="DropDownList1" DefaultValue="-1" Name="UserID" PropertyName="SelectedValue"
              Type="Int32" />
          <asp:SessionParameter DefaultValue="-1" Name="ComplainUserID" SessionField="UserID"
              Type="Int32" />
          <asp:ControlParameter ControlID="DropStartTime1" DefaultValue="" Name="LatelyDate"
              PropertyName="SelectedValue" Type="String" />
          <asp:ControlParameter ControlID="DropType1" DefaultValue="" Name="ComplainType" PropertyName="SelectedValue"
              Type="String" />
      </SelectParameters>
      <UpdateParameters>
          <asp:Parameter Name="Status" Type="String" />
          <asp:Parameter Name="UserID" Type="Int32" />
          <asp:Parameter Name="ComplainUserID" Type="Int32" />
          <asp:Parameter Name="LatelyDate" Type="String" />
          <asp:Parameter Name="ComplainType" Type="String" />
      </UpdateParameters>
      <DeleteParameters>
          <asp:Parameter Name="ComplainID" Type="Int32" />
      </DeleteParameters>
</asp:ObjectDataSource>       
</asp:Content>

