<%@ Page Language="C#" MasterPageFile="~/Template1.Master" AutoEventWireup="true" CodeBehind="DeptCharge.aspx.cs" Inherits="WebApplication1.WebForm1" Title="无标题页" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title>部门管理</title>
    <style type="text/css">
        .style1
        {
            width: 148px;
        }
        #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: 531px; height: 307px;">
        <tr>
        <td colspan="3" style="background-color:Green; font-weight:bold; text-align:center">部门管理</td>
        </tr>
            <tr>
                <td style="text-align: right; " class="style1">
                    请输入部门编号：
                </td>
                <td>
                    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
                </td>
                <td align="right">
                    <asp:Button ID="Button1" runat="server" Text="查询" OnClick="btnLogin_Click" />
                </td>
            </tr>
            <tr>
                 <td colspan="3">
                 <asp:GridView ID="gvwDep" runat="server" Width="506px" AutoGenerateColumns="False" 
                         Height="70px" DataKeyNames="deptid" onrowcommand="gvwDep_RowCommand" 
                         onrowdeleting="gvwDep_RowDeleting">
                     <Columns>
                         <asp:BoundField HeaderText="部门编号" DataField="deptid" ReadOnly="True" 
                             SortExpression="deptid" />
                         <asp:BoundField HeaderText="部门名称" DataField="deptname" 
                             SortExpression="deptname" />
                         <asp:BoundField HeaderText="部门介绍" DataField="deptintro" 
                             SortExpression="deptintro" />
                         <asp:TemplateField>
                          <ItemTemplate>
                             <asp:Button ID="btnUpt" runat="server" Text="修改" CommandName="Edit" CommandArgument='<%# Eval("deptid")%>'/>
                             <asp:Button ID="btnDele" runat="server" Text="删除" CommandName="Delete" CommandArgument='<%# Eval("deptid")%>'/>
                          </ItemTemplate>
                         </asp:TemplateField>
                     </Columns>
                     </asp:GridView>
                 </td>
            </tr>
            
            <tr>
                <td align="center" colspan="3">
                    <asp:Button ID="btnAdd" runat="server" Text="添加" onclick="btnAdd_Click" 
                        style="height: 26px" />
                </td>
            </tr>
        </table>
    </div>
</body>
</asp:Content>
