<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Files.aspx.cs" Inherits="TotCms.Web.Office.Files.Files" %>
<%@ Register assembly="TotCms.Controls" namespace="TotCms.Controls" tagprefix="cc1" %>
<!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 id="Head1" runat="server">
    <title>文档管理</title>
    <link href="../style/global.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="right_dqwz">文档管理</div>

    <table cellpadding="0" cellspacing="1" border="0" width="100%">
      <tr>
        <td colspan="6" class="topic">
          <asp:TextBox ID="tbTitle" runat="server"></asp:TextBox>
    <asp:Button ID="Button1" runat="server" Text="查询" onclick="Button1_Click" />
    <a href="File_Edit.aspx?folderid=<%=GetFolderId() %>">+添加文档</a>
    </td>
      </tr>   
    </table>
    <table cellpadding="0" cellspacing="1" border="0" width="100%">         
    <asp:Repeater ID="rptList" runat="server" 
      onitemcommand="rptList_ItemCommand">
        <HeaderTemplate>
          <tr class="suphead">
              <td width="8%"> </td>
              <td width="38%" style="text-align:left; padding-left:5px;">名称</td>
              <td width="11%">文件大小</td>
              <td width="11%">上传者</td>
              <td width="15%">上传日期</td>              
              <td width="17%">操作</td>
          </tr>
        </HeaderTemplate>
        <ItemTemplate>
          <tr class="lines">
            <td>
              <asp:UpdatePanel ID="UpdatePanel1" runat="server">
              <ContentTemplate>
              <asp:CheckBox ID="ChkId" runat="server" Checked="false" />
              </ContentTemplate>
              <Triggers>
              <asp:AsyncPostBackTrigger ControlID="BtnSelect" EventName="Click" /> 
              </Triggers>
              </asp:UpdatePanel>
              <asp:TextBox ID="ChkTxt" runat="server" CssClass="hidden" Text='<%# Eval("id") %>'></asp:TextBox>              
              </td>
            <td style="text-align:left; padding-left:5px;"><a href='File_Show.aspx?id=<%# Eval("id") %>'><%# Eval("Title")%></a></td>
            <td><%# SizeFormat(Eval("FileSize"))%></td>
            <td><a href='../Staff/Staff_Show.aspx?id=<%# Eval("StaffId") %>'><%# Eval("UserName")%></a></td>
            <td><%# Eval("PubDate", "{0:yyyy-MM-dd}")%></td>            
            <td>
            <a href='File_Edit.aspx?folderid=<%=GetFolderId() %>&id=<%# Eval("id")%>'>编辑</a>
						|
						<asp:LinkButton ID="LinkButton2" OnLoad="Delete_Load" runat="server" CommandName="delete" CommandArgument='<%# Eval("id") %>'>删除</asp:LinkButton>
            </td>
          </tr>
         </ItemTemplate>
         </asp:Repeater>
         <tr>
          <td colspan="9" align="center">
            <asp:Button ID="BtnSelect" runat="server" Text="反选" onclick="BtnSelect_Click" />
            <asp:DropDownList ID="BatRunType" runat="server">
            <asp:ListItem Text="选择操作" Value="" ></asp:ListItem>
            <asp:ListItem Text="批量删除" Value="del"></asp:ListItem>
            </asp:DropDownList>
            <asp:Button ID="BtnRun" runat="server" Text="执行操作" onclick="BtnRun_Click" OnClientClick="return confirm('确定执行吗?')" />
          </td>
         </tr>      
    </table>    
    
    <cc1:Pager ID="Pager1" runat="server" GenerateFirstLastSection="True" 
      GenerateGoToSection="True" GenerateHiddenHyperlinks="False" 
      QueryStringParameterName="CurrentPage" OnCommand="pager_Command" 
      GoToStyle="text" OfClause="/" PageClause="页" PageSize="15" />
    
    </form>
</body>
</html>