<%@ page language="C#" autoeventwireup="true" inherits="Course_CourseAdjunctLFRM, App_Web_vzflj4p3" stylesheettheme="Themes" theme="Themes" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" 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 runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>课程附件管理</title>
<%--<link id="artDialogSkin" href="../js/skin/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/artDialog.js"></script>--%>
    <script src="../js/artDialog3/artDialog.min.js"></script>
      <script>          (function($) { var d = $.dialog.defaults; d.skin = ['chrome']; })(art);</script>
    <script type="text/javascript">
        //artDialog js的完美弹出层
        function showEdit(url) {
            var sURL = url;
//            art.dialog({ id: 'myDialogNote', title: '编辑课件基本信息', iframe: sURL, width: '350', height: '150', lock: true }).close(function() {
//                //弹出窗口关闭后调用的函数
//            window.location = location;
//        });

        art.dialog.open(sURL, { id: 'myDialogNote', title: '编辑课件基本信息', width: '350px', height: '150px', lock: true, closeFn: function() { window.location = location; } });
            return false;
        };
  
</script>
</head>

<script language="javascript">
    function CheckAll() {
        var cked = false;
        cked = document.getElementById("chkSelAll").checked;
        for (var i = 0; i < document.getElementsByTagName("*").length; i++) {
            var e = document.getElementsByTagName("*")[i];
            try {
                if (e.name.substring(e.name.length - 6, e.name.length) == "chkSel") {
                    e.checked = cked;
                }
            }
            catch (exception) {
            }
        }
    }
    function CheckSelect() {
        var count = 0;
        for (var i = 0; i < document.getElementsByTagName("*").length; i++) {
            var e = document.getElementsByTagName("*")[i];
            try {
                if (e.name.substring(e.name.length - 6, e.name.length) == "chkSel") {
                    if (e.checked == true) {
                        count++;
                    }
                }
            }
            catch (exception) {
            }
        }
        if (count == 0) {
            //alert("请选择您要删除的项！");
            art.dialog({ content: '请选择您要删除的项！', lock: true, icon: 'alert', width: '200px' }, function() { return true; });
            return false;
        }
        else {
            return confirm('您确定要删除所选项吗?');
        }
    }
</script>
    <script type="text/javascript" src="../Js/jquery.js"></script>
<body>
<div id="loading">
        <div style="position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; background-color: #ffffff;
            z-index: 10; filter: alpha(opacity=90); opacity: 0.9;">
        </div>
        <div id="msg_area" style="z-index: 200; left: 289px; position: absolute; top: 202px;">
            <div id="msgPanel" style="z-index: 200;" height="24px" width="100px" bordercolor="#eeeeee"
                borderstyle="Solid" borderwidth="1px">
                <asp:Image ID="img" runat="server" ImageUrl="~/images/loading.gif" />
                <font style="font-size: 9pt;color:Gray;">loading...读取中......</font>
            </div>
        </div>
    </div>
    <form id="form1" runat="server">
      <div class="box">
        <table bgcolor="white" width="100%" cellpadding="5" cellspacing="0" border="0">
            <tr>
                <td align="right">
                    <asp:Button ID="btnAdd" SkinID="big_btn" runat="server" Text="新增普通课件" OnClick="btnAdd_Click" />
                    <asp:Button ID="btnAddSCORM" SkinID="big_btn" runat="server" Text="新增SCORM课件" 
                        onclick="btnAddSCORM_Click"  />
                    <asp:Button ID="btnDel" runat="server" Text="删除" OnClick="btnDel_Click" />
                    <asp:Button ID="btnReturn" runat="server" Text="返回" OnClick="btnReturn_Click" 
                        Visible="False" />
                </td>
            </tr>
        </table>
    </div>
    <div>
        <asp:GridView ID="gvCourseAdjunct" runat="server" AllowPaging="True" AutoGenerateColumns="False"
            DataKeyNames="ID" OnRowCommand="gvCourseAdjunct_RowCommand" OnRowDataBound="gvCourseAdjunct_RowDataBound">
            <PagerSettings Visible="False" />
            <Columns>
                <asp:TemplateField>
                    <HeaderTemplate>
                        全选<input id="chkSelAll" name="chkSelAll" onclick="javascript:CheckAll();" type="checkbox">
                    </HeaderTemplate>
                    <HeaderStyle Width="50px" />
                    <ItemTemplate>
                        <asp:CheckBox ID="chkSel" runat="server" />
                        <asp:Image ID="imgSCORMErr" ToolTip="SCORM课件解析异常" Visible="false" ImageUrl="../images/error.gif" runat="server" />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:BoundField DataField="FileType" HeaderText="文件类型" />
                <asp:BoundField DataField="FileName" HeaderText="附件名称" />
                <asp:BoundField DataField="FilePath" HeaderText="附件文件名" />
                <asp:BoundField DataField="FIleSize" HeaderText="附件大小" />
                <asp:BoundField DataField="LastWriteTime" DataFormatString="{0:D}" HeaderText="最后修改时间" />
                <asp:TemplateField HeaderText="操作">
                    <ItemTemplate>
                        <asp:LinkButton ID="ibtnEdit" runat="server" CommandName="edit1" Text="编辑" />
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            
            <EmptyDataRowStyle HorizontalAlign="Center" />
        </asp:GridView>
    </div>
    <div class="page_bg_left">
        <cc1:AspNetPager ID="myAspNetPager" runat="server" AlwaysShow="True" CssClass="cut_pager"
                                PageSize="10" FirstPageText="首页&nbsp;&nbsp;" HorizontalAlign="Right" InputBoxStyle="width:20px;"
                                LastPageText="尾页" NextPageText="&nbsp;&nbsp;下一页&nbsp;&nbsp;" NumericButtonTextFormatString="  {0}"
                                OnPageChanging="AspNetPager1_PageChanging" PrevPageText="上一页" ShowCustomInfoSection="Left"
                                CustomInfoTextAlign="Left" ShowInputBox="Always">
                            </cc1:AspNetPager>
    </div>
    
    </form>
       <script type="text/javascript">
           $("#loading").fadeOut()
</script>
</body>

</html>
