<%@ page language="C#" autoeventwireup="true" inherits="general_SystemManage_DeptUser_List, CrmCommand" %>
<%@ Register TagPrefix="C1WebGrid" Namespace="C1.Web.C1WebGrid" Assembly="C1.Web.C1WebGrid.2" %>
<!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 runat="server">
    <title>无标题页</title>
    <script>
    function addNew()
    {
        var id = document.getElementById("Hid").value;  
        parent.user_main.location='DeptUser_New.aspx?id='+id;
        return false;
    }
    </script>
</head>
<body class="bodycolor" topmargin="5">
    <form id="form1" runat="server">
    	<TABLE class="small" cellSpacing="1" cellPadding="2" width="100%" align="center" border="0" bgcolor=#000000>
    	<tr>
    	<td class="TableData" noWrap style="width:508px"><font size=4><b>
            <asp:Label ID="LblDeptName" runat="server" Text=""></asp:Label>--用户列表</b></font>:&nbsp;&nbsp;&nbsp;&nbsp;<asp:CheckBox
                ID="ChkState" runat="server"  Text="显示离职人员" AutoPostBack="True" OnCheckedChanged="ChkState_CheckedChanged"/></td>
      <td class="TableData" noWrap>
          <asp:Button ID="BtnNew" runat="server" Text="新增用户" OnClientClick="return addNew();"   CssClass="BigButton"/> </td>
    	</tr>
					<TR>
					<td align=center noWrap  valign=top  class="TableData" height=500 colspan=2>
				 <c1webgrid:c1webgrid   SkinId="gridviewSkin" Width=100%   ID="C1WebGrid1" 

  runat="server" AutoGenerateColumns="False"  AllowPaging=true  

PageSize=20 OnItemCommand="C1WebGrid1_ItemCommand" OnItemCreated="C1WebGrid1_ItemCreated" OnPageIndexChanging="C1WebGrid1_PageIndexChanging"  >
        <Columns>

  
            <C1WebGrid:C1BoundColumn  Visible=false    DataField="UserID" HeaderText="编

号"/> 

            <C1WebGrid:C1BoundColumn  DataField="UserName" HeaderText="真实姓名" /> 
            <C1WebGrid:C1BoundColumn  DataField="Exp4" HeaderText="所属部门" /> 
            <C1WebGrid:C1BoundColumn  DataField="Exp5" HeaderText="部门角色" /> 
            
            <C1WebGrid:C1BoundColumn  DataField="Sex" HeaderText="性别" /> 
           
            
<c1webgrid:C1TemplateColumn  HeaderText="用户状态" >

<ItemTemplate>
    
    <%# Eval("UserState").ToString() == "0" ? "在职" : "<font color=red>离职</font>"%>
                    
</ItemTemplate>
</c1webgrid:C1TemplateColumn>
           
           
         
            <c1webgrid:C1TemplateColumn  HeaderText="操作" >

<ItemTemplate>
<a href='DeptUser_Edit.aspx?lid=<%=ViewState["id"].ToString()%>&deptid=<%#Eval("Exp7")%>&id=<%#Eval("UserID")%>'>编辑用户</a>

   <asp:LinkButton ID="LbtDel"    runat="server" CausesValidation="False" CommandName="Del" OnClientClick="return confirm('确定清空该用户的密码吗?');"
                            Text="重置密码"></asp:LinkButton>
 
   
 
                    
</ItemTemplate>
</c1webgrid:C1TemplateColumn>
            
            
        </Columns> 
    
        </c1webgrid:c1webgrid>
    </td>
    </TR> 
       
    </TABLE> 
        <input id="Hid" runat=server  type="hidden" />
    </form>
</body>
</html>
