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

OA系统

开发平台:

ASP/ASPX

  1. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="file_list.aspx.cs" Inherits="web_regulation_file_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><br />
  11.     <center>
  12.         <asp:Panel ID="PnlFileList" runat="server" Style="position: relative">
  13.             <asp:GridView ID="FileList" runat="server" AllowPaging="True" AllowSorting="True"
  14.                 AutoGenerateColumns="False" BackColor="White" BorderColor="#999999" BorderStyle="None"
  15.                 BorderWidth="1px" CellPadding="3" DataKeyNames="id" DataSourceID="SqlDataSource2"
  16.                 GridLines="Vertical" OnRowCommand="FileList_RowCommand"
  17.                 OnRowDataBound="FileList_RowDataBound" Style="position: relative" Width="550px">
  18.                 <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
  19.                 <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
  20.                 <Columns>
  21.                     <asp:TemplateField HeaderText="檔案名稱">
  22.                         <ItemTemplate>
  23.                             <asp:LinkButton ID="BtnFile" runat="server" CommandArgument='<%# Eval("id") %>' Style="position: relative"
  24.                                 Text='<%# Eval("real_name") %>' CommandName="DownLoad"></asp:LinkButton>
  25.                         </ItemTemplate>
  26.                     </asp:TemplateField>
  27.                     <asp:BoundField DataField="cre_date" HeaderText="創建時間" SortExpression="cre_date" />
  28.                     <asp:BoundField DataField="cre_user" HeaderText="創建人" SortExpression="cre_user" />
  29.                     <asp:TemplateField>
  30.                         <ItemTemplate>
  31.                             <asp:LinkButton ID="BtnDelete" runat="server" CommandArgument='<%# Eval("id") %>'
  32.                                 Style="position: relative" CommandName="DeleteData" OnClientClick="return confirm('確定要刪除嗎?')">刪除</asp:LinkButton>
  33.                         </ItemTemplate>
  34.                     </asp:TemplateField>
  35.                 </Columns>
  36.                 <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
  37.                 <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
  38.                 <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
  39.                 <AlternatingRowStyle BackColor="Gainsboro" />
  40.             </asp:GridView>
  41.             <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:oaConnection %>"
  42.                 SelectCommand="SELECT id, real_name, cre_date, cre_user FROM dbo.OA_REGULATION_FILE  WHERE (dir_id = @dir_id)">
  43.                 <SelectParameters>
  44.                     <asp:SessionParameter Name="dir_id" SessionField="dir_id" />
  45.                 </SelectParameters>
  46.             </asp:SqlDataSource>
  47.         </asp:Panel>
  48.     </center>
  49.     </div>
  50.     </form>
  51. </body>
  52. </html>