<%@ Page Language="C#" MasterPageFile="~/Template1.Master" AutoEventWireup="true" CodeBehind="Usermessage.aspx.cs" Inherits="WebApplication1.usermessage" Title="员工详细信息" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>无标题页</title>
    <style type="text/css">
        #juzhong { text-align:center; }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<body>
    <div id="juzhong">
    <table style="border: 1px none Black; width: 693px; margin-right: 59px;">
        <tr>
        <td colspan="3" style="background-color:yellow; font-weight:bold; text-align:center">员工信息</td>
        </tr>
            <tr>
                <td style="text-align: right;">
                    请输入员工编号：
                </td>
                <td>
                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Button ID="Button1" runat="server" Text="查询" onclick="Button1_Click"  />
                </td>
            </tr>
            <tr>
                 <td colspan="3">
                 <asp:GridView ID="gvwDep" runat="server" Width="682px" AutoGenerateColumns="False" 
                         Height="70px" BackColor="White" BorderColor="White" BorderStyle="Ridge" 
                         BorderWidth="2px" CellPadding="3" onrowcommand="gvwDep_RowCommand" 
                         onrowdeleting="gvwDep_RowDeleting" CellSpacing="1" GridLines="None">
                     <FooterStyle BackColor="#C6C3C6" ForeColor="Black" />
                     <RowStyle BackColor="#DEDFDE" ForeColor="Black" />
                     <Columns>
                         <asp:BoundField HeaderText="员工编号" DataField="userid" />
                         <asp:BoundField HeaderText="员工姓名" DataField="username" />
                         <asp:BoundField HeaderText="员工性别" DataField="usersex" />
                         <asp:BoundField HeaderText="出生日期" DataField="userbirthday" HtmlEncode="False" DataFormatString="{0:yyyy-MM-dd}"/>
                           <asp:BoundField HeaderText="员工职位" DataField="userzhiwei" />
                           <asp:BoundField HeaderText="毕业学校" DataField="userschool" />
                             <asp:BoundField HeaderText="联系电话" DataField="usertel" />
                       <asp:TemplateField>
                         <ItemTemplate>
                             <asp:Button ID="btnUpt" runat="server" Text="修改" CommandName="Edit" CommandArgument='<%# Eval("userid")%>'/>
                             
                         </ItemTemplate>
                         </asp:TemplateField>

                         <asp:CommandField ShowDeleteButton="True" />
                     </Columns>
                    
                     <PagerStyle BackColor="#C6C3C6" ForeColor="Black" HorizontalAlign="Right" />
                     <SelectedRowStyle BackColor="#9471DE" Font-Bold="True" ForeColor="White" />
                     <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#E7E7FF" />
                     </asp:GridView>
                 </td>
            </tr>
            
            <tr>
                <td style="text-align:center" colspan="3" >
                    <asp:Button ID="btnAdd" runat="server" Text="添加" onclick="btnAdd_Click" 
                        Width="164px"  />
                </td>
            </tr>
        </table>
    </div>
</body>
</asp:Content>
