<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Admin_User.aspx.cs" Inherits="admin_Admin_User" %>

<!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>
    <link href="images/StyleSheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table class="tableBorder" cellspacing="1" cellpadding="3" align="center" border="0">
          <tbody>
            <tr>
              <th align="left" class="tableHeaderText" height="25" style="font-size:14px; color:#d6dff7; font-weight:bold;">&nbsp;&nbsp;&nbsp;&nbsp;会员管理</th>
            </tr>
          </tbody>
          <tbody>
            <tr>
              <td height="23" class="forumRow">
                  <asp:gridview ID="GVadmin" runat="server" AllowPaging="True" AutoGenerateColumns="False" Height="1px" Width="98%" OnRowCancelingEdit="GVadmin_RowCancelingEdit" OnRowDataBound="GVadmin_RowDataBound" OnRowEditing="GVadmin_RowEditing" BorderWidth="1px" CellPadding="1" OnPageIndexChanging="GVadmin_PageIndexChanging" OnRowUpdating="GVadmin_RowUpdating" OnRowDeleting="GVadmin_RowDeleting" >
                      <columns>
                          <asp:templatefield HeaderText="编号">
                              <itemstyle HorizontalAlign="Center" />
                              <itemtemplate>
                                  <asp:label ID="LBid" runat="server" Text='<%# Eval("UserID") %>'></asp:label>
                              </itemtemplate>
                          </asp:templatefield>
                          <asp:boundfield DataField="UserName" HeaderText="用户名" ReadOnly="True" >
                              <itemstyle HorizontalAlign="Center" />
                              <headerstyle HorizontalAlign="Center" />
                          </asp:boundfield>
                          <asp:templatefield HeaderText="密码">
                              <edititemtemplate>
                                  <asp:textbox ID="TBpwd" runat="server" Text='<%# Eval("Password") %>'></asp:textbox>
                              </edititemtemplate>
                              <itemstyle HorizontalAlign="Center" />
                              <itemtemplate>
                                  <asp:label ID="Label2" runat="server" Text='<%# Eval("Password") %>'></asp:label>
                              </itemtemplate>
                          </asp:templatefield>
                          
                          <asp:templatefield HeaderText="编辑">
                           <itemtemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="false" CommandName="Edit" Text="编辑"></asp:LinkButton>
                           </itemtemplate>
                           <edititemtemplate>
                            <asp:LinkButton ID="link1" runat="server" CommandName="Update" Text="更新" CausesValidation="False"></asp:LinkButton>&nbsp;
                            <asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="false" CommandName="Cancel" Text="取消"></asp:LinkButton>
                           </edititemtemplate> 
                              <itemstyle HorizontalAlign="Center" />
                              <headerstyle HorizontalAlign="Center" />
                          </asp:templatefield>
                          
                          <asp:templatefield HeaderText="删除">
                           <itemtemplate>
                               <asp:linkbutton CausesValidation="false" ID="LinkButton3" CommandName="Delete" runat="server">删除</asp:linkbutton>
                           </itemtemplate>
                              <itemstyle HorizontalAlign="Center" />
                          </asp:templatefield>
                      </columns>
                    <headerstyle Font-Bold="False" Font-Italic="False" Font-Overline="False" Font-Strikeout="False" Font-Underline="False" />
                      <pagersettings FirstPageText="首页" LastPageText="尾页" Mode="NextPreviousFirstLast"
                          NextPageText="下一页" PreviousPageText="上一页" />
                      <pagerstyle HorizontalAlign="Center" />
                    
                  </asp:gridview>
    </td>
            </tr>
          </tbody>
          <tbody>
            <tr>
              <th class="tableHeaderText" height="25"></th>
            </tr>
          </tbody>
        </table>
        <br />
        <table class="tableBorder" cellspacing="1" cellpadding="3" align="center" border="0">
          <tbody>
            <tr>
              <th class="tableHeaderText" height="25" style="font-size:14px; color:#d6dff7; font-weight:bold;" align="left">&nbsp;&nbsp;&nbsp;&nbsp;添加管理员</th>
            </tr>
          </tbody>
          <tbody>
            <tr>
              <td height="23" class="forumRow">
              <table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
                <tr>
                  <td width="36%" align="right"><span style="width: 94px; height: 23px">用&nbsp;户&nbsp;名：</span></td>
                  <td width="64%"><span style="height: 23px; width: 281px;">
                    <asp:TextBox ID="UserName" runat="server" Width="144px"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="UserName"
                        Display="Dynamic" ErrorMessage="*"></asp:RequiredFieldValidator>
                    <asp:CustomValidator ID="CustomValidator1" runat="server" ControlToValidate="UserName"
                        Display="Dynamic" ErrorMessage="该用户已存在" OnServerValidate="CustomValidator1_ServerValidate"></asp:CustomValidator>
                  </span></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="23" class="forumRow"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
                <tr>
                  <td width="36%" align="right"><span style="width: 94px">密&nbsp;&nbsp;&nbsp;&nbsp;码：</span></td>
                  <td width="64%"><span style="width: 281px">
                    <asp:TextBox ID="UserPwd" runat="server" Width="144px" TextMode="Password"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="UserPwd"
                        ErrorMessage="*"></asp:RequiredFieldValidator>
                  </span></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="23" class="forumRow"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
                <tr>
                  <td width="36%" align="right"><span style="width: 94px">确认密码：</span></td>
                  <td width="64%"><span style="width: 281px">
                    <asp:TextBox ID="UserPwd2" runat="server" Width="145px" TextMode="Password"></asp:TextBox>
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="UserPwd2"
                        ControlToValidate="UserPwd" ErrorMessage="*"></asp:CompareValidator>
                  </span></td>
                </tr>
              </table></td>
            </tr>
            <tr>
              <td height="23" align="center" class="forumRow"><span style="height: 24px">
                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="添加" />                
                <font face="宋体"> &nbsp;</font>
                <asp:Button ID="Button2" runat="server" Text="取消" />                
              </span></td>
            </tr>
          </tbody>
          <tbody>
            <tr>
              <th class="tableHeaderText" height="25"></th>
            </tr>
          </tbody>
        </table>
    </div>
    </form>
</body>
</html>
