<%@ Page Language="C#" AutoEventWireup="True" Inherits="Admin_Admin_Manage"
  CodeBehind="Admin_Admin.aspx.cs" %>

<%@ Register Src="Memu/InfovrsionControl.ascx" TagName="InfovrsionControl" TagPrefix="uc1" %>
<html>
<head id="Head1" runat="server">
  <title>管理员管理</title>
  <link href="Css/StyleSheet.css" rel="stylesheet" type="text/css" />

  <script language="JavaScript" type="text/javascript" src="../JS/Popup.js"></script>

</head>
<body topmargin="0"> 
  <form id="myform" runat="server">
  <div style="clear:both;height:auto;">
    <div style="text-align: center">
      <br />
      <asp:Panel ID="panellist" runat="server" Width="100%">
        <table style="width: 100%" border="0" cellspacing="1" cellpadding="3" height="1" class="table">
          <tr>
            <td class="Title" style="height: 25px">
              &nbsp;管 理 员 管 理
            </td>
          </tr>
          <tr>
            <td class="td">
              <asp:GridView ID="myGridView" runat="server" AutoGenerateColumns="False" OnPageIndexChanging="myGridView_PageIndexChanging"
                AllowPaging="True" Width="100%" HorizontalAlign="Center" DataKeyNames="ManageID">
                <HeaderStyle Font-Bold="True" Wrap="False" ForeColor="White" CssClass="title" BackColor="#799AE1"
                  Height="25px"></HeaderStyle>
                <Columns>
                  <asp:BoundField DataField="ManageID" HeaderText="编号">
                    <ItemStyle HorizontalAlign="Center" />
                  </asp:BoundField>
                  <asp:BoundField DataField="ManageName" HeaderText="姓 名">
                    <ItemStyle HorizontalAlign="Center" />
                  </asp:BoundField>
                  <asp:BoundField DataField="LastTime" HeaderText="最后登录时间">
                    <ItemStyle HorizontalAlign="Center" />
                  </asp:BoundField>
                  <asp:TemplateField HeaderText="最后登录IP">
                    <ItemStyle HorizontalAlign="Center" />
                    <ItemTemplate>
                      <%#Eval("LastIP")%>
                    </ItemTemplate>
                  </asp:TemplateField>
                  <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                      <asp:LinkButton ID="LinkButton2" runat="server" OnClick="LinkButton2_Click" CommandName='<%#Eval("ManageID") %>'>修改</asp:LinkButton>
                      &nbsp; &nbsp;<asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click"
                        OnClientClick="return window.confirm('确定删除吗？');" CommandName='<%#Eval("ManageID") %>'>删除</asp:LinkButton>
                    </ItemTemplate>
                    <ItemStyle HorizontalAlign="Center" />
                  </asp:TemplateField>
                </Columns>
                <PagerSettings FirstPageText="首页" LastPageText="尾页" Mode="NextPreviousFirstLast"
                  NextPageText="下一页" PreviousPageText="上一页" />
                <PagerStyle HorizontalAlign="Right" />
              </asp:GridView>
            </td>
          </tr>
          <tr>
            <td>
            </td>
          </tr>
        </table>
      </asp:Panel>
      <asp:Panel ID="Paneladd" runat="server" Width="100%">
        <table border="0" cellpadding="0" cellspacing="2" class="Table" style="width: 100%">
          <tbody>
            <tr>
              <td align="left" class="title" colspan="2" style="height: 28px">
                &nbsp;<asp:Label ID="lblTitle" runat="server" Text="添 加 管 理 员"></asp:Label>
              </td>
            </tr>
            <tr>
              <td align="right" class="td" height="25" style="width: 102px">
                姓 名：
              </td>
              <td class="td" height="25" style="width: 886px">
                <asp:TextBox ID="txtusername" runat="server" ValidationGroup="add" Width="120px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtusername"
                  ErrorMessage="请输入用户名" ValidationGroup="add"></asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right" class="td" height="25" style="width: 102px">
                密 码：
              </td>
              <td class="td" height="25" style="width: 886px">
                <asp:TextBox ID="txtpwd" runat="server" ValidationGroup="add" TextMode="Password"
                  Width="120px"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtpwd"
                  ErrorMessage="请输入密码" ValidationGroup="add"></asp:RequiredFieldValidator>
              </td>
            </tr>
            <tr>
              <td align="right" class="td" style="height: 25px; width: 102px;">
                确认密码：
              </td>
              <td class="td" style="width: 886px; height: 25px;">
                <asp:TextBox ID="txtrepwd" runat="server" ValidationGroup="add" TextMode="Password"
                  Width="120px"></asp:TextBox>
                <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtpwd"
                  ControlToValidate="txtrepwd" ErrorMessage="两次密码不一致" ValidationGroup="add"></asp:CompareValidator>
              </td>
            </tr>
            <tr>
              <td align="right" class="td" height="25" style="width: 102px">
                级别：
              </td>
              <td class="td" height="25" style="width: 886px">
                <asp:CheckBoxList ID="ChBlevel" runat="server" RepeatDirection="Horizontal" ValidationGroup="add">
                </asp:CheckBoxList>
              </td>
            </tr>
            <tr>
              <td align="right" class="td" height="25" style="width: 102px">
              </td>
              <td class="td" height="25" style="width: 886px">
                <asp:Button ID="Button1" runat="server" Text=" 添加管理员" OnClick="Button1_Click" ValidationGroup="add" />
              </td>
            </tr>
          </tbody>
        </table>
      </asp:Panel>
    </div>

  <asp:Panel ID="Panelmodify" runat="server" Width="100%">
    <table border="0" cellpadding="0" cellspacing="2" class="Table" style="width: 100%">
      <tbody>
        <tr>
          <td align="left" class="title" colspan="2" style="height: 28px">
            &nbsp;<asp:Label ID="Label1" runat="server" Text="修 改 管 理 员"></asp:Label>
          </td>
        </tr>
        <tr>
          <td align="right" class="td" height="25" width="104">
            姓 名：
          </td>
          <td style="width: 886px" class="td" height="25">
            <asp:Label ID="lblMangeName" runat="server" Text="Label"></asp:Label>
            <asp:Label ID="lblManageID" runat="server" Text="Label" Visible="false"></asp:Label>
          </td>
        </tr>
        <tr>
          <td align="right" class="td" height="25">
            原始密码：
          </td>
          <td class="td" height="25" style="width: 886px">
            <asp:TextBox ID="txtoldpassword" runat="server" ValidationGroup="add" TextMode="Password"
              Width="120px"></asp:TextBox>&nbsp; 注（不更改密码请保留为空）
          </td>
        </tr>
        <tr>
          <td align="right" class="td" style="height: 25px">
            密 码：
          </td>
          <td class="td" style="width: 886px; height: 25px;">
            <asp:TextBox ID="txtmodifypwd" runat="server" ValidationGroup="add" TextMode="Password"
              Width="120px"></asp:TextBox>
          </td>
        </tr>
        <tr>
          <td align="right" class="td" style="height: 25px">
            确认密码：
          </td>
          <td class="td" style="width: 886px; height: 25px;">
            <asp:TextBox ID="txtmodifyrepwd" runat="server" ValidationGroup="add" TextMode="Password"
              Width="120px"></asp:TextBox><asp:CompareValidator ID="CompareValidator2" runat="server"
                ControlToCompare="txtmodifyrepwd" ControlToValidate="txtmodifypwd" ErrorMessage="两次密码不一致"
                ValidationGroup="add"></asp:CompareValidator>
          </td>
        </tr>
        <tr>
          <td align="right" class="td" height="25">
            级别：
          </td>
          <td class="td" style="width: 886px;" height="25">
            <asp:CheckBoxList ID="ChManageLevel" runat="server" RepeatDirection="Horizontal"
              ValidationGroup="add">
            </asp:CheckBoxList>
          </td>
        </tr>
        <tr>
          <td align="right" class="td" height="25">
          </td>
          <td class="td" height="25" style="width: 886px">
            <asp:Button ID="Button2" OnClick="Button2_Click" runat="server" Text=" 确认修改 " ValidationGroup="add">
            </asp:Button>
          </td>
        </tr>
      </tbody>
    </table>
  </asp:Panel>
  </div>

  <uc1:InfovrsionControl ID="InfovrsionControl1" runat="server" />
  </form>
</body>
</html>