<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RelevanceBeMng.aspx.cs" Inherits="Webdisk.RelevanceBeMng" %>

<!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 rel="stylesheet" type="text/css" href="themes/icon.css" />
    <link href="themes/default/easyui.css" rel="stylesheet" type="text/css" />
    <script src="js/jquery-1.7.1.min.js" type="text/javascript"></script>
    <script src="js/easyloader.js" type="text/javascript"></script>
    <link href="css/demo.css" rel="stylesheet" type="text/css" />
    <script src="js/Common.js" type="text/javascript"></script>
</head>
<body style="overflow:hidden; margin:0px">
    <form id="form1" runat="server"  style="margin:0px;">
    <div style="padding:2px">
    <div id="divBeRelevanceFile" class="easyui-panel" title="" data-options="border:false,fit:true"  style="overflow-x:hidden; overflow-y:auto;">
        <div id="divRelevanceBeFile" style="overflow-y:auto; overflow-x:hiddne; margin:0px;"></div>
    </div></div>
    </form>
</body>
</html>
<script type="text/javascript">
$(function () {
    $("#divRelevanceBeFile").css("width",common.PageWidth());
    $("#divRelevanceBeFile").css("height",common.PageHeight());
    using(['datagrid','pagination'], function () {
        $('#divRelevanceBeFile').datagrid({
            title: '',
            loadMsg: "数据加载中，请稍后……",
            nowrap: true,
            striped: true,
            collapsible: true,
            rownumbers: true,
            showFooter: true,
            striped: true,
            fitColumns:true,
            url: 'RelevanceHandler.ashx?cmd=LoadBeRelevanceGrid&id='+<%=strID %>,
            pageList: [10, 15, 20, 25, 30, 40, 50],
            pageSize: 20,
            pagination: true,
            sortName: 'FileName',
            sortOrder: 'asc',
            remoteSort: false,
            idField: 'id',
           columns: [[
                    { field: 'FileName', title: '文件名', align: 'left', width:400,fixed:true, sortable: true },
                    { 
                        field: 'FileSize', title: '大小', width: 80, align: 'center', sortable: true,
                        formatter: function(value,row,index){
				            if(value>1073741824)
                                return  Math.round(value/1073741824,2)+ "GB";
                            else if (value > 1048576) 
                                return  Math.round(value/1048576,2) + "MB";
                            else if (value > 1024) 
                                return  Math.round(value/1024) +" KB";
                            else return  "0 KB";
			            }
                    },
                    { field: 'FileExt', title: '文件类型', width: 80, align: 'center', sortable: true },
                    { field: 'UserName', title: '所属用户', width: 80, align: 'center', sortable: true }
                ]],
            pagination: true,
            rownumbers: true
           
        });
         });
         
    });
</script>