dir_list.aspx
资源名称:web.rar [点击查看]
上传用户:xrffrp
上传日期:2022-03-25
资源大小:22155k
文件大小:4k
源码类别:
OA系统
开发平台:
ASP/ASPX
- <%@ Page Language="C#" AutoEventWireup="true" CodeFile="dir_list.aspx.cs" Inherits="web_regulation_dir_list" %>
- <!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="../../css/style.css" rel="stylesheet" type="text/css" />
- </head>
- <body>
- <form id="form1" runat="server">
- <div>
- <center>
- </center>
- <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">
- <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
- <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
- <Columns>
- <asp:BoundField DataField="name" HeaderText="目錄名稱" SortExpression="name" ></asp:BoundField>
- <asp:BoundField DataField="description" HeaderText="目錄描述" SortExpression="description" ></asp:BoundField>
- <asp:CommandField ShowEditButton="True" ></asp:CommandField>
- <asp:TemplateField>
- <ItemTemplate>
- <asp:LinkButton ID="BtnDelete" runat="server" CommandName="DeleteData" OnClientClick='return confirm("確定要刪除嗎?");'
- Style="position: relative">刪除</asp:LinkButton>
- </ItemTemplate>
- </asp:TemplateField>
- </Columns>
- <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
- <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
- <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
- <AlternatingRowStyle BackColor="Gainsboro" />
- </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 %>">
- <SelectParameters>
- <asp:SessionParameter DefaultValue="16" Name="parent_id" SessionField="dir_id" Type="Int32" />
- </SelectParameters>
- <DeleteParameters>
- <asp:Parameter Name="id" Type="Int32" />
- </DeleteParameters>
- <UpdateParameters>
- <asp:Parameter Name="name" Type="String" />
- <asp:Parameter Name="description" Type="String" />
- <asp:Parameter Name="id" Type="Int32" />
- </UpdateParameters>
- <InsertParameters>
- <asp:Parameter Name="name" Type="String" />
- <asp:Parameter Name="description" Type="String" />
- <asp:Parameter Name="id" Type="Int32" />
- </InsertParameters>
- </asp:SqlDataSource>
- </div>
- </form>
- </body>
- </html>