<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="index.aspx.cs" Inherits="KstCMS.KstCMS_Manager.SystemSet.Users.urs.index" %>

<%@Register TagPrefix="Webdiver" Namespace="Webdiver" Assembly="AspnetPager" %>

<html>
<head  runat="server">
    <title>无标题页</title>
</head>
<body>

    <form id="form1" runat="server">
    <div class="MainBox">
        <asp:ScriptManager ID="ScriptManager1" runat="server"  AllowCustomErrorsRedirect="false"></asp:ScriptManager>

    <asp:UpdatePanel ID="UpdatePanel1"  UpdateMode="Conditional"  runat="server" > 
    <ContentTemplate>
    
<table class="PageTitle" width="100%"><tr><td>
       
       <table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><img src="<%=SysRootUrl %>/KstCMS_Manager/images/user_group.gif" align="absmiddle" /> <b> 用户管理</b></td>
    <td align="right">
        <asp:DropDownList ID="RoleId" runat="server">
        </asp:DropDownList>
        
        <asp:Button ID="SearchBtn" runat="server" Text="查找" CssClass="smallButton" OnClick="SearchBtn_Click"  />
        <input type="button" value="新增用户" class="bigButton" onclick="location.href='AddUser.aspx';" />
    </td>
  </tr>
</table>

       </td></tr></table>
       
<asp:Panel ID="Panel1" runat="server">

<asp:Repeater ID="RepMain" runat="server">
       <HeaderTemplate>    
       <table width="100%" border="0" cellspacing="1" cellpadding="5" class="Table_Gray">
  <tr class="TableHeader">
    <td>用户名</td>
    <td>姓 名</td>
    <td>角 色</td>
    <td>邮件地址</td>
    <td>帐户状态</td>
    <td>操 作</td>
  </tr>
  </HeaderTemplate>
  <ItemTemplate>
  <tr class="TableTd_Gray">
    <td align="center"><%#DataBinder.Eval(Container.DataItem,"UserName") %></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem,"YourName") %></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem, "RoleNameList")%></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem, "Email")%></td>
    <td align="center">
     <asp:ImageButton ID="ImageButton1" CommandArgument="0" CommandName=<%#DataBinder.Eval(Container.DataItem,"UserName") %> runat="server"  />    
    </td>
    <td>
        <a href="EditUsers.aspx?UserName=<%#DataBinder.Eval(Container.DataItem,"UserName") %>">修改</a> 
        <asp:LinkButton ID="LinkButton1" CommandArgument="1" CommandName=<%#DataBinder.Eval(Container.DataItem,"UserName") %> runat="server" OnClientClick="return confirm('确认清空此用户密码?');">清空密码</asp:LinkButton>
        <asp:LinkButton ID="LinkButton2" CommandArgument="2" CommandName=<%#DataBinder.Eval(Container.DataItem,"UserName") %> runat="server" OnClientClick="return confirm('真的删除当前用户吗？');">删除</asp:LinkButton>
    </td>
  </tr>
  </ItemTemplate>
  <AlternatingItemTemplate>
    <tr class="TableTd_Gray1">
    <td align="center"><%#DataBinder.Eval(Container.DataItem,"UserName") %></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem,"YourName") %></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem, "RoleNameList")%></td>
    <td align="center"><%#DataBinder.Eval(Container.DataItem, "Email")%></td>
    <td align="center">
     <asp:ImageButton ID="ImageButton1" CommandArgument="0" CommandName=<%#DataBinder.Eval(Container.DataItem,"UserName") %> runat="server"  />    
    </td>
    <td>
        <a href="EditUsers.aspx?UserName=<%#DataBinder.Eval(Container.DataItem,"UserName") %>">修改</a> 
        <asp:LinkButton ID="LinkButton1" CommandArgument="1" CommandName=<%#DataBinder.Eval(Container.DataItem,"UserName") %> runat="server" OnClientClick="return confirm('确认清空此用户密码?');">清空密码</asp:LinkButton>
        <asp:LinkButton ID="LinkButton2" CommandArgument="2" CommandName=<%#DataBinder.Eval(Container.DataItem,"UserName") %> runat="server" OnClientClick="return confirm('真的删除当前用户吗？');">删除</asp:LinkButton>
    </td>
  </tr>
  </AlternatingItemTemplate>
  <FooterTemplate>
</table>
</FooterTemplate>
   </asp:Repeater>   

 <br />
 <table width="100%" border="0" cellspacing="2" cellpadding="0" align="center"  class="PageBox">
  <tr>
    <td>
    
     <asp:Literal ID="PageInfo" runat="server"></asp:Literal>
    </td>
    <td>
    
<Webdiver:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" PageSize="10" DisabledButtonImageNameExtension="g" CpiButtonImageNameExtension="r" ButtonImageNameExtension="n" ImagePath="~/images" PagingButtonSpacing="0" CustomInfoSectionWidth="35%"  UrlPaging="false" NumericButtonTextFormatString="[{0}]" SubmitButtonText="GO" ShowInputBox="Always" ShowCustomInfoSection="left" HorizontalAlign="Right" OnPageChanged="AspNetPager1_PageChanged" Font-Size="10pt" SubmitButtonClass="uPageBtn" InputBoxClass="input_text" CssClass="uPage"> 
</Webdiver:AspNetPager>
    
    </td>
  </tr>
</table> 

       
 </asp:Panel>        
       
       
       
    </ContentTemplate>
   </asp:UpdatePanel> 


       <asp:UpdateProgress ID="UpdateProgress1" AssociatedUpdatePanelID="UpdatePanel1" runat="server">
    <ProgressTemplate>请稍候...</ProgressTemplate>
    </asp:UpdateProgress>     
    </div>

 
    </form>