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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="dir_list.aspx.cs" Inherits="web_regulation_dir_list" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" >
  4. <head runat="server">
  5.     <title>无标题页</title>
  6.     <link href="../../css/style.css" rel="stylesheet" type="text/css" />
  7. </head>
  8. <body>
  9.     <form id="form1" runat="server">
  10.     <div>
  11.     <center>
  12.         &nbsp;</center>
  13.     <asp:GridView style="POSITION: relative" id="DirList" runat="server" Width="550px" OnRowUpdated="DirList_RowUpdated" GridLines="Vertical" DataSourceID="SqlDataSource1" DataKeyNames="id" CellPadding="3" BorderWidth="1px" BorderStyle="None" BorderColor="#999999" BackColor="White" AutoGenerateColumns="False" AllowPaging="True" OnRowCommand="DirList_RowCommand" OnRowCreated="DirList_RowCreated">
  14.                 <FooterStyle BackColor="#CCCCCC" ForeColor="Black"  />
  15.                 <RowStyle BackColor="#EEEEEE" ForeColor="Black"  />
  16.                 <Columns>
  17.                     <asp:BoundField DataField="name" HeaderText="目錄名稱" SortExpression="name" ></asp:BoundField>
  18.                     <asp:BoundField DataField="description" HeaderText="目錄描述" SortExpression="description" ></asp:BoundField>
  19.                     <asp:CommandField ShowEditButton="True" ></asp:CommandField>
  20.                     <asp:TemplateField>
  21.                         <ItemTemplate>
  22.                             <asp:LinkButton ID="BtnDelete" runat="server" CommandName="DeleteData" OnClientClick='return confirm("確定要刪除嗎?");'
  23.                                 Style="position: relative">刪除</asp:LinkButton>
  24.                         </ItemTemplate>
  25.                     </asp:TemplateField>
  26.                 </Columns>
  27.                 <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center"  />
  28.                 <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White"  />
  29.                 <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White"  />
  30.                 <AlternatingRowStyle BackColor="Gainsboro"  />
  31.             </asp:GridView><asp:SqlDataSource id="SqlDataSource1" runat="server" UpdateCommand="UPDATE [OA_SYS_CHILD_MENU] SET [name] = @name, [description] = @description WHERE [id] = @id" SelectCommand="SELECT [name], [description], [id] FROM [OA_SYS_CHILD_MENU] WHERE ([parent_id] = @parent_id) and is_dir='Y' ORDER BY [sequence]" InsertCommand="INSERT INTO [OA_SYS_CHILD_MENU] ([name], [description], [id]) VALUES (@name, @description, @id)" DeleteCommand="DELETE FROM [OA_SYS_CHILD_MENU] WHERE [id] = @id" ConnectionString="<%$ ConnectionStrings:oaConnection %>">
  32.                 <SelectParameters>
  33.                     <asp:SessionParameter DefaultValue="16" Name="parent_id" SessionField="dir_id" Type="Int32" />
  34.                 </SelectParameters>
  35.                 <DeleteParameters>
  36.                     <asp:Parameter Name="id" Type="Int32"  />
  37.                 </DeleteParameters>
  38.                 <UpdateParameters>
  39.                     <asp:Parameter Name="name" Type="String"  />
  40.                     <asp:Parameter Name="description" Type="String"  />
  41.                     <asp:Parameter Name="id" Type="Int32"  />
  42.                 </UpdateParameters>
  43.                 <InsertParameters>
  44.                     <asp:Parameter Name="name" Type="String"  />
  45.                     <asp:Parameter Name="description" Type="String"  />
  46.                     <asp:Parameter Name="id" Type="Int32"  />
  47.                 </InsertParameters>
  48.             </asp:SqlDataSource>
  49.     </div>
  50.     </form>
  51. </body>
  52. </html>