<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CS_SharesList.aspx.cs"
    Inherits="RM.Web.Training.Courseware.CS_SharesList" %>

<%@ Register Src="~/UserControl/PageControl.ascx" TagName="PageControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>
<!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><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_List_Title")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_ShareList_ckgx")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="text-align: right">
            <uc2:LoadButton ID="LoadButton1" runat="server" />
        </div>
    </div>
    <div class="div-body">
        <table id="tableList" class="grid" singleselect="true">
            <thead>
                <tr>
                    <td style="width: 50px; text-align: left;">
                        <label id="checkAllOff" onclick="CheckAllLine()" title="全选">
                            &nbsp;</label>
                    </td>
                    <td style="width: 450px; text-align: center;">
                         <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("FileName")%>
                    </td>
                    <td style="width: 300px; text-align: center;">
                     
                        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_ShareList_fsr")%>
                    </td>
                    <td style="width: 150px; text-align: center;">
                     <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_ShareList_xzcs")%>
                     
                    </td>
                    <td>
                    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_ShareList_fxsj")%>
                        
                    </td>
                </tr>
            </thead>
            <tbody>
                <asp:Repeater ID="rp_Item" runat="server">
                    <ItemTemplate>
                        <tr>
                            <td style="width: 50px; text-align: left;">
                                <input type="checkbox" value="<%#Eval("Shares_SaId")%>" name="checkbox" />
                            </td>
                            <td style="width: 450px; text-align: center;">
                                <%#Eval("Shares_FileName")%><%#Eval("Shares_FilePostfix")%>
                            </td>
                            <td style="width: 300px; text-align: center;">
                                <%#Eval("User_Name")%>
                            </td>
                            <td style="width: 150px; text-align: center;">
                                <asp:Label ID="lblUser_Sex" runat="server" Text='<%#Eval("Shares_SaDownloadCount")%>'></asp:Label>
                            </td>
                            <%--                           <td style="width: 50px; text-align: center;">
                                <asp:Label ID="lblDeleteMark" runat="server" Text='<%#Eval("DeleteMark")%>'></asp:Label>
                            </td>--%>
                            <td>
                                <%#Eval("Shares_SaShareDate")%>
                            </td>
                            <%--         <td>
                                <%#Eval("Shares_SaDiscription")%>
                            </td>--%>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        <% if (rp_Item != null)
                           {
                               if (rp_Item.Items.Count == 0)
                               {
                                   Response.Write("<tr><td colspan='8' style='color:red;text-align:center'>"+RM.Common.DotNetConfig.LanguageHelper.GetKey("Null")+"</td></tr>");
                               }
                           } %>
                    </FooterTemplate>
                </asp:Repeater>
            </tbody>
        </table>
    </div>
    <uc1:PageControl ID="PageControl1" runat="server" />
    </form>
    <script type="text/javascript">
        $(function () {
            //把分页定位到屏幕下面
            divresize(90);
            FixedTableHeader("#tableList", $(window).height() - 121);
        })
        function add() {
//            top.art.dialog.open('/Training/Courseware/CS_AddShares.aspx?key=' + QueryString('CoursewareKey'),
//            {
//                id: 'CS_AddShares',
//                title: '共享管理 - 添加课件共享',
//                width: 500,
//                height: 400,
//                left: '50%',
//                top: '50%',
//                background: '#000000',
//                opacity: 0.1,
//                lock: true,
//                resize: false,
//                close: function () {
//                    Loading(true);
//                    window.parent.frames["main"].window.location.reload();
//                }
//            }, false);
            top.openDialog('/Training/Courseware/CS_AddShares.aspx?key=' + QueryString('CoursewareKey'), 'Courseware_gx', '<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_ShareList_xzkjgx")%>', 700, 400, 50, 50);

        }
        //删除
        function Delete() {
            var arrt = new Array();
            arrt = CheckboxValue().split('|');
            var key = arrt[0];
            if (IsEditdata(CheckboxValue())) {
                var delparm = 'action=Virtualdelete&module=<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CS_SharesGroup_Title")%>&tableName=TKS_Shares&pkName=Shares_SaId&pkVal=' + key;
                delConfig('/Ajax/Common_Ajax.ashx', delparm)
            }
        }
        //返回
        function back() {
            window.location = "CS_SharesGroup.aspx";
        }
    </script>
</body>
</html>
