<%@ Page Title="添加用户" Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Users_EditUser.aspx.cs" Inherits="Vote.Admin.Users_EditUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

  


 <div class="result-wrap">
    
        <div class="result-title">
            <b>说明</b>：添加修改用户资料。
    </div>

     <div class="result-list">
     

              <table  class="table table-hover"     >

        <tbody> 
        <tr  >     
         <th >用户名</th>
          <td> 
             <asp:TextBox   ID="username"  CssClass="form-control"   runat="server"></asp:TextBox> 
            <asp:RequiredFieldValidator ControlToValidate="username" ID="RequiredFieldValidator2" runat="server" ErrorMessage="用户名不能够为空" Display="Dynamic"></asp:RequiredFieldValidator>
        </td>
           
        <th  >密码</th>
        <td style="width:250px;" > 
             <asp:TextBox ID="password"  CssClass="form-control"  runat="server"  ></asp:TextBox>
               
          </td>
         
        <th width=120px rowspan="3" valign="middle"> 头像</th>
          <td rowspan="3"> 
                
                 <a href="#" target="_blank"  id="a_avtor">
                      <img src="img/nopic.jpg" id="img_avtor" height="80px" style=" margin:5px;  border:0px; vertical-align:middle" />
                   </a>
                   
                    <a href="#" onclick="window.open('Upload.aspx'); return false;">上传图片</a>

                    <div style=" display:none ">
					 <asp:textbox id="image_small" Width="150px"  ClientIDMode="Static" Runat="server"></asp:textbox> 
			         <asp:textbox id="image_big" ClientIDMode="Static" Width="150px" Runat="server"></asp:textbox>
                  </div>
					  
         </td>
           
           </tr>

             


           
           <tr>
           
     <th>邮件</th>
         <td> 
            <asp:TextBox ID="email"  CssClass="form-control"   runat="server"></asp:TextBox>  
         </td>
          
          
          
          
          
           <th  >部门</th>
           <td> 
           
               
         <div class="input-group">
            <asp:TextBox ID="txt_department"  ClientIDMode="Static"  CssClass="form-control"     runat="server"></asp:TextBox> 

             <span class="input-group-addon">
     <a href="#"  onclick="setdept();return false;"   ><i class="glyphicon glyphicon-th"></i>
    </a> 
</span>

          </div> 

               
            </td>  
          
          
           </tr>
          
          
      
          
  <tr>    
      <th  >显示名</th>
            <td> 
              <asp:TextBox ID="txt_displayname"  CssClass="form-control" runat="server"></asp:TextBox>
             </td>


    <th  >电话</th>
      <td>  
              <asp:TextBox ID="tel"  CssClass="form-control"  runat="server"></asp:TextBox>  
      </td> 
        
       </tr>
          
          
          <tr>  
            <th >办公室</th>
             <td>
             <asp:TextBox ID="office"   CssClass="form-control"   runat="server"></asp:TextBox> 
            </td>

          
         <th >职务</th>
          <td >  
              <asp:TextBox ID="txt_title"   CssClass="form-control"  runat="server"></asp:TextBox>   
           </td>
            
                  
                    
      <th >传真</th>
        <td> 
          <asp:TextBox ID="fax"  CssClass="form-control"   runat="server"></asp:TextBox>  
       </td> 

  </tr>
          
          
          
           <tr> 
           
           <th>员工号</th>
            <td >  
              <asp:TextBox ID="txt_staffcode"   CssClass="form-control"  runat="server"></asp:TextBox>   
           </td>
            
          
         <th  >性别</th>
          <td  >  
              <asp:DropDownList ID="ddl_sex"  CssClass="form-control" runat="server" Width="140px">
              <asp:ListItem Text="" Value=""></asp:ListItem>
              <asp:ListItem Text="男" Value="男"></asp:ListItem>
              <asp:ListItem Text="女" Value="女"></asp:ListItem>
              </asp:DropDownList> 
           </td>
           
            
           
		 <th  >帐户属性</th>
		  <td  >
		 
             <asp:CheckBox ID="cb_ismgr" runat="server"  Text="经理" /> &nbsp;
		 
		 <asp:CheckBox ID="cb_issec" runat="server"  Text="秘书"/>&nbsp;
		 
		 	 <asp:CheckBox ID="cb_isstaff" runat="server"  Text="Staff成员"/>
		 
        
         </td>
            
           
          </tr>
          
          
          
          
          
          
          
          
          
          
          
          
          
           <tr >
         <th  >
          自我简介 
              </th>
               <td colspan="5">
           
              <asp:TextBox ID="txt_intro"  CssClass="form-control"  Width="600" Height=80
                   TextMode=MultiLine  runat="server"></asp:TextBox>
         
          </td>
          </tr>   
          
          
          
         <tr >
          <td colspan="6" align="center">
              
               
              <div class="btnc">
              <asp:Button ID="update"  runat="server" OnClick="update_Click" class="btn btn-primary btn6 mr10"   Text="更新" />
              <asp:Button ID="add"  runat="server" OnClick="add_Click"  class="btn btn-primary btn6 mr10"    Text="添加" />
               <asp:Button ID="del"  CausesValidation="false" runat="server" OnClick="del_Click"    OnClientClick="return confirm('确定要删除吗');" class="btn  btn-danger"  Text="删除" />
               <input type="button" value="返回员工列表"  class="btn  btn-default"  onclick="window.location='Users_Lists.aspx';" />
              </div>
              
                                               
          </td></tr>
          
          
        
 
</tbody>
</table>
  
  
    </div>
    
    
      

        <script>

            function ResetImg(s, b) {

                $("#image_small").val(s);
                $("#image_big").val(b);
                $("#img_avtor").attr("src", s);
                $("#a_avtor").attr("href", b);

            }
        
        
        </script>

        


     
                  <div id="div_dept" style="display:none">
        <ul id="dept">
          <asp:Literal runat="server" ID="lb_dept"></asp:Literal> 
          </ul>
        </div>
        
     
         

        <script>

            function setdept() {
                layer.open({
                    type: 1,
                    title:"选择部门",
                    skin: 'layui-layer-rim', //加上边框
                    area: ['420px', '240px'], //宽高
                    content: formatStr()
                });
            }



            function formatStr() {
                result = "<br>";
                $("#dept li").each(
                    function () {
                        result += '<a href="#" onclick="javascript:closethis(this); return false;" class="btn  btn-flat  btn-sm">' + $(this).text() + '</a> ';
                    }
               );

                return result;
            }


            function closethis(cont) {

                $("#txt_department").val($(cont).html());
                layer.closeAll();

            }



        </script>
    
    
    
    
    
    
    

</asp:Content>
