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

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ 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 id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=7" />
    <title>课程管理</title>

<script type="text/javascript" src="../Js/jquery.js"></script>
  <script type="text/javascript" src="../js/vtip/vtip.js"></script>

    <link rel="stylesheet" type="text/css" href="../js/vtip/css/vtip.css" />
</head>


    
<script language="javascript" type="text/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];
            //alert(e);
            try {
                
                if (e.name.substring(e.name.length - 6, e.name.length) == "chkSel") {
                  
                    e.checked = cked;
                }
            }
            catch (exception) {
            }
        }
    }
    function CheckSelect(mess1, mess2) {
        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(mess1);
            return false;
        }
        else {
            return confirm(mess2);
        }
    }
</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" defaultbutton="btnSearch">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    &nbsp;<asp:AutoCompleteExtender ID="AutoCompleteExtender1" runat="server" TargetControlID="txtSearchName"
        CompletionSetCount="12" CompletionInterval="1" EnableCaching="true" MinimumPrefixLength="1"
        ServicePath="../services/AutoComplete.asmx" ServiceMethod="GetCourseNameList">
    </asp:AutoCompleteExtender>
    <table cellpadding="0" cellspacing="0" class="table_box">
        <tr>
            <td class="right_bg">
                <span class="right_title">
                    <img src="../Images/homen.gif" class="img_style" />
                    您的当前位置：资源管理 > 资源范围 &gt; 自建课程</span>
            </td>
        </tr>
        <tr>
            <td class="r_top_box" style="height:100%;">
                <table cellspacing="0" cellpadding="5" class="r_top_title_box">
                    <tr >
                        <td align="right" width="80px">
                            课程名称：
                        </td>
                        <td style="width: 150px">
                            <asp:TextBox ID="txtSearchName" runat="server" Width="150px" MaxLength="25"></asp:TextBox>
                        </td>
                        <td align="right" width="80px">
                            所属类型：
                        </td>
                        <td>
                            <asp:DropDownList ID="ddlSearchType" runat="server">
                            </asp:DropDownList>
                        </td>
                        <td align="right" width="80px">
                            使用状态：
                        </td>
                        <td align="left" width="180px">
                            <asp:RadioButtonList ID="rblState" runat="server" RepeatDirection="Horizontal">
                            </asp:RadioButtonList>
                        </td>
                        <td align="left">
                            <asp:Button ID="btnSearch" runat="server" Text="查  询" OnClick="btnSearch_Click" />
                        </td>
                        <td width="10px">
                        </td>
                    </tr>
                    </table>
            </td>
        </tr>
        <tr>
            <td class="margintop5">
                <table cellpadding="0" cellspacing="0" width="100%">
                    <tr>
                        <td>
                            <asp:GridView ID="gvCourse" runat="server" PageSize="10" AllowPaging="True" AutoGenerateColumns="False"
                                DataKeyNames="CourseID" OnRowCommand="gvCourse_RowCommand" OnRowDataBound="gvCourse_RowDataBound">
                                <PagerSettings Visible="False" />
                                <Columns>
                                  
                                    <asp:TemplateField HeaderText="课程名称">
                                        <ItemTemplate>
                                            <asp:Label ID="lblCourseId" Font-Names="微软雅黑" ForeColor="Green" runat="server" Text='<%# Bind("CourseID") %>'
                                                Visible="False"></asp:Label>
                                            <a class="vtip" title='<%#  "<img height=160 width=120  src=\""+"../Upload/CourseImage/"+Eval("photopath")+"\" />" %>'><asp:Label ID="lblCourseName" runat="server" 
                                                Text='<%# Bind("Name") %>' Visible="true"></asp:Label></a>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="所属类型">
                                        <ItemTemplate>
                                            <asp:Label ID="Label2" runat="server" Text='<%# Eval("TypeID").ToString() %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="Minutes" HeaderText="课时分钟" />
                                    <asp:TemplateField HeaderText="是否考试">
                                        <ItemTemplate>
                                            <asp:Label ID="lblIsMustExam" runat="server" Text='<%# Eval("IsMustExam").ToString() %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:TemplateField HeaderText="状态">
                                        <ItemTemplate>
                                            <asp:Label ID="lblState" runat="server" Text='<%# Eval("State").ToString() %>'></asp:Label>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField DataField="LastWriteTime" DataFormatString="{0:d}" HeaderText="更新时间" />
                                    <asp:TemplateField HeaderText="操作">
                                        <ItemTemplate>
                                           
                                            <asp:LinkButton ID="LinkButton1" runat="server" CommandName="show" Text="预览"
                                                ForeColor="#430050" />
                                           
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                </Columns>
                            </asp:GridView>
                        </td>
                    </tr>
                    <tr>
                        <td 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>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    </form>


  <script type="text/javascript">
     $("#loading").fadeOut()
</script>

</body>
</html>

