department_main.aspx
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:6k
源码类别:

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="department_main.aspx.cs" Inherits="web_department_department_main" %>
  2. <!--%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
  3.     Namespace="System.Web.UI" TagPrefix="asp" %-->
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  5. <html xmlns="http://www.w3.org/1999/xhtml" >
  6. <head runat="server">
  7.     <title>无标题页</title>
  8.     <link href="../../../css/style.css" rel="stylesheet" type="text/css" />
  9. </head>
  10. <body>
  11. <center>
  12.     <form id="form1" runat="server">
  13.     <div>
  14.         &nbsp; &nbsp;&nbsp;
  15.         <center>
  16.         <asp:GridView ID="Department_list" runat="server" AutoGenerateColumns="False" BackColor="White"
  17.             BorderColor="#999999" BorderStyle="None" BorderWidth="1px" CellPadding="3" DataSourceID="SqlDataSource1"
  18.             GridLines="Vertical" Width="522px" OnRowDataBound="Department_list_RowDataBound">
  19.             <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
  20.             <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
  21.             <Columns>
  22.                 <asp:BoundField DataField="name" HeaderText="部门名稱" SortExpression="name" />
  23.                 <asp:TemplateField HeaderText="排序">
  24.                     <ItemTemplate>
  25.                         <center>
  26.                         <asp:HyperLink ID="linkUp" runat="server" ImageUrl="~/images/up.jpg" Style="position: relative">HyperLink</asp:HyperLink>
  27.                         <asp:HyperLink ID="linkDown" runat="server" ImageUrl="~/images/down.jpg" Style="position: relative;">HyperLink</asp:HyperLink>
  28.                         </center>
  29.                     </ItemTemplate>
  30.                 </asp:TemplateField>
  31.                 <asp:BoundField DataField="id" HeaderText="id" ReadOnly="True" SortExpression="id" />
  32.             </Columns>
  33.             <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
  34.             <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
  35.             <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
  36.             <AlternatingRowStyle BackColor="Gainsboro" />
  37.         </asp:GridView>
  38.             <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  39.                 SelectCommand="SELECT [name], [sequence], [id] FROM [OA_DEPARTMENT] WHERE ([last_id] = @last_id) ORDER BY [sequence]">
  40.                 <SelectParameters>
  41.                     <asp:QueryStringParameter DefaultValue="1" Name="last_id" QueryStringField="last_id"
  42.                         Type="Int32" />
  43.                 </SelectParameters>
  44.             </asp:SqlDataSource>
  45.             &nbsp;&nbsp;
  46.             <asp:Panel ID="Panel1" runat="server" Style="position: relative" Width="562px">
  47.                 <br />
  48.                 <asp:Label ID="lblAdd" runat="server" Font-Bold="True" Font-Size="Medium" Style="position: relative"
  49.                     Text="添加下級部門"></asp:Label>
  50.                 <center>
  51.                     <table border="1" style="position: relative">
  52.                         <tr>
  53.                             <td align="center" style="width: 122px; height: 23px;">
  54.                                 上級部門:</td>
  55.                             <td align="left" style="width: 322px; height: 23px;">
  56.                                 <asp:Label ID="lblLast_department" runat="server" Text=""></asp:Label>
  57.                             </td>
  58.                         </tr>
  59.                         <tr>
  60.                             <td align="center" style="width: 122px">
  61.                                 部門名稱:</td>
  62.                             <td align="left" style="width: 322px">
  63.                                 <asp:TextBox ID="txtName" runat="server" Width="200px"></asp:TextBox>
  64.                                 <asp:Label ID="Label3" runat="server" ForeColor="Red" Style="position: relative"
  65.                                     Text="*"></asp:Label>
  66.                                 <asp:Label ID="lblName" runat="server" ForeColor="Red" Style="position: relative"></asp:Label></td>
  67.                         </tr>
  68.                         <tr>
  69.                             <td align="center" style="width: 122px">
  70.                                 部門代號:</td>
  71.                             <td align="left" style="width: 322px">
  72.                                 <asp:TextBox ID="txtCode" runat="server" Width="200px"></asp:TextBox>&nbsp;
  73.                             </td>
  74.                         </tr>
  75.                         <tr>
  76.                             <td align="center" style="width: 122px">
  77.                                 電話:</td>
  78.                             <td align="left" style="width: 322px">
  79.                                 <asp:TextBox ID="txtTel" runat="server" Width="200px"></asp:TextBox>
  80.                             </td>
  81.                         </tr>
  82.                         <tr>
  83.                             <td align="center" style="width: 122px">
  84.                                 傳真:</td>
  85.                             <td align="left" style="width: 322px">
  86.                                 <asp:TextBox ID="txtFax" runat="server" Width="200px"></asp:TextBox>
  87.                             </td>
  88.                         </tr>
  89.                         <tr>
  90.                             <td align="center" style="width: 122px">
  91.                                 部門職能:</td>
  92.                             <td align="left" style="width: 322px">
  93.                                 <asp:TextBox ID="txtFunction" runat="server" Width="200px"></asp:TextBox>
  94.                             </td>
  95.                         </tr>
  96.                         <tr>
  97.                             <td align="center" colspan="3">
  98.                                 <asp:Button ID="btnOk" runat="server" OnClick="btnOk_Click" Text="儲存" />
  99.                             </td>
  100.                         </tr>
  101.                     </table>
  102.                 </center>
  103.             </asp:Panel>
  104.             &nbsp;&nbsp;
  105.         </center>
  106.     </div>
  107.     </form>
  108. </center>
  109. </body>
  110. </html>