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

<!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="skin/Skin1/Table.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .style1
        {
            width: 100%;
        } .gvHead{background-image:url(skin/Skin1/tab_19.gif); }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <table class="style1">
        <tr>
            <td>
                管理员帐号：<asp:TextBox ID="TextBox1" runat="server" CssClass="txt" MaxLength="20" 
                    Width="215px"></asp:TextBox>
&nbsp; 密码：<asp:TextBox ID="TextBox2" runat="server" CssClass="txt" MaxLength="20" 
                   Width="204px"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="Button1" runat="server" CssClass="button" 
                    onclick="Button1_Click" Text="添加管理员" />
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                    CellPadding="4" ForeColor="#333333" GridLines="None" 
                    onrowcancelingedit="GridView1_RowCancelingEdit" 
                    onrowediting="GridView1_RowEditing" Width="100%" 
                    onrowdeleting="GridView1_RowDeleting" DataKeyNames="id" 
                    onrowupdating="GridView1_RowUpdating">
                    <RowStyle BackColor="#EFF3FB" />
                    <Columns>
                        <asp:TemplateField HeaderText="编号" SortExpression="id">
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Bind("id") %>'></asp:Label>
                            </ItemTemplate>
   
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="管理员帐号" SortExpression="uid">
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Bind("uid") %>' Font-Bold="True"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="密码" SortExpression="upwd">
                            <ItemTemplate>
                                <asp:Label ID="Label2" runat="server" Text='<%# Bind("upwd") %>'></asp:Label>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("upwd").ToString().DESDecrypt() %>'></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="添加日期" SortExpression="addtime">
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Bind("addtime") %>' Font-Bold="True"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="编辑">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbtnedit" runat="server" CausesValidation="False" 
                                    CommandName="Edit" Text="编辑"></asp:LinkButton>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:LinkButton ID="lbtnupdate" runat="server" CausesValidation="True" 
                                    CommandName="Update" Text="更新"></asp:LinkButton>
                                &nbsp;<asp:LinkButton ID="lbtncancle" runat="server" CausesValidation="False" 
                                    CommandName="Cancel" Text="取消"></asp:LinkButton>
                            </EditItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="删除">
                            <ItemTemplate>
                                <asp:LinkButton ID="lbtndel" runat="server" CausesValidation="False" 
                                    CommandName="Delete" Text="删除" OnClientClick="return window.confirm('您确定要执行删除操作吗？');"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center"  CssClass="gvHead"/>
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" CssClass="gvHead" />
                    <EditRowStyle BackColor="#CCCCCC" />
                    <AlternatingRowStyle BackColor="White" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <div>
    
    </div>
    </form>
</body>
</html>
