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

OA系统

开发平台:

ASP/ASPX

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