<%@ Page Language="C#" AutoEventWireup="true" EnableViewState="false" CodeBehind="Searchusers.aspx.cs" Inherits="Book.Book.Searchusers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title>员工通讯薄</title>
        <link href="../Style/common.css" rel="stylesheet" type="text/css" />
    <script>
        function o(r) {
              document.getElementById("txt_emails").value+=r+","
        }
    
    </script>
 
	  
 </head>
	
	
 
<body style=" font-family:Courier New; font-size:11px;">
  
    <div>
     
    <form id="Form1" runat="server" >
 
	 请输入用户名： 
    <asp:TextBox ID="txt_search" runat="server"></asp:TextBox>
    <asp:Button ID="btn_search" runat="server" Text="搜索" 
         onclick="btn_search_Click" /> (双击选择用户)
	 <hr />
	  <div style=" width:800px; height:400px; overflow:scroll"> 
	 
	 
	 
	 <asp:Panel runat="server" ID="pnl_notad">
	 
	 
	 <asp:Repeater runat="server" ID="rpt_notad"
	  >
	 <ItemTemplate>
	
	 
 <table width=600px> 
    <tr ondblclick="o('<%#Eval("email") %>')" > 
       <td width=150px> <%#Eval("username") %>
       </td>   
       <td width=200px><%#Eval("email") %></td>
       <td width=*><%#Eval("department") %></td></tr> 
        </table> 
	 
	 </ItemTemplate>
	 
	 </asp:Repeater>
	 
	 </asp:Panel>
	 
	 
	 
	 
	 
	 
	 	 <asp:Panel runat="server" ID="pnl_ad">
	 
	 
	 <asp:Repeater runat="server" ID="rpt_ad"
	  >
	 <ItemTemplate>
	
	 
 <table width=600px> 
    <tr ondblclick="o('<%# ((ADUserInfo)Container.DataItem).Email %>')" > 
       <td width=150px> 
       
          <%# ((ADUserInfo)Container.DataItem).Username %>
       </td>   
       <td width=200px>   <%# ((ADUserInfo)Container.DataItem).Email %></td>
       <td width=*>   <%# ((ADUserInfo)Container.DataItem).Department %></td>
       </tr> 
        </table> 
	 
	 </ItemTemplate>
	 
	 </asp:Repeater>
	 
	 </asp:Panel>
	 </div>
     
  
      
    <asp:TextBox ID="txt_emails" TextMode="MultiLine"  style=" width:900px; height:50px" runat="server"></asp:TextBox>
      
      
      <br />
      
      
      
        <input id="Button1" type="button" value="提交" onclick="Ok()" />
        
        
       <script>
           function Ok() {

               var c = document.getElementById('<%=txt_emails.ClientID%>').value;
               window.opener.SetValues(c);
               window.close();
           }
       
       </script>
        
    </div>
 
 
 
 </form>
</body>
</html>