<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="skyautocoursecontinuelist.aspx.cs" Inherits="Us.Web.admin.autocourse.skyautocoursecontinuelist" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <title>课程联排</title>
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
    <%=ImportScriptStr %>

    
    <script language="javascript" type="text/javascript">
        function opJsTree(txt, txtValue) {

           var txtCNumber = $("#" + txt).val();
           var txtSkyTID = $("#" + txtValue).val();

            var para = "/admin/autocourse/skyautocoursecontinuetree.aspx?para=" + "2" + "&list=" + $("#" + txtValue).val() + "&skytid=" + txtSkyTID + "&skycnumber=" + txtCNumber;
            //alert(para);
            //UsOpenDialogTree(para, txt, txtValue);
            CareffArtOpen4(para, '课程选择',400, 600, function (path) {
                //alert(path);
                if (path == null) { return false; }
                var strs = path.split("#")
                var m = $id(txt)

                //alert(strs[0] + "-" + txtSkyTID + "-" + txtCNumber);
                //m.value = strs[1];
                //var m1 = $id(txtValue)
                //m1.value = strs[0];
                //document.getElementById("btnSearch").click();

                var data = "";
                data = "id=9&skytid=" + txtSkyTID + "&skycnumber=" + txtCNumber + "&list=" + strs[0]
                //alert(data);
                $.ajax({
                    type: "POST",
                    url: "autocoursemainajax.aspx",
                    data: data,
                    success: function (msg) {
                        //alert(msg);
                        if (msg == "0") {
                            document.getElementById("btnSearch").click();
                        }
                        else {
                            alert("对不起，操作失败");
                        }
                    }
                });
            });
        }


    </script>
</head>
<body>
    <form id="Form1" method="post" runat="server">
        <div class="divTbg">
            <div class="divTbgL"></div>
            <div class="divTbgInfo">
                <div class="divTbgTitle">课程联排管理</div>
            </div>
        </div>
        <div class="divTbgF"></div>
        <div class="divSearchBoth">
            <div class="divInfo">
                <div class="divInfoblack">
                    <div class="divInfoTopList">
                        <div class="listLeft">
                            <div class="navsearchtitle">
                                课程联排搜索
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="divInfo">
                <div class="divSearch">
                    <div id="searchBox" class="clearsearch">

                        <p>
                            <label for="txtSkyDepartCourseID">课程名称：</label><asp:TextBox ID="txtSkyDepartCourseID" runat="server" ToolTip="课程名称"></asp:TextBox>
                        </p>
                        <p>
                            <label for="txtSkyCID">班级名称：</label><asp:TextBox ID="txtSkyCID" runat="server" ToolTip="班级名称"></asp:TextBox>
                        </p>
                        <p class="nodisplay">
                            <label for="txtSkyTID">开课学期：</label><asp:TextBox ID="txtSkyTID" runat="server" ToolTip="开课学期">1007</asp:TextBox>
                        </p>
                        <p class="nodisplay">
                            <label for="txtCNumber">预排字段：</label><asp:TextBox ID="txtCNumber" runat="server" ToolTip="">4</asp:TextBox>
                        </p>



                        <p>
                            <asp:Button ID="btnSearch" runat="server" OnClick="btnSearch_Click" Text="确认搜索" CssClass="SkyButtonFocus" />
                        </p>
                    </div>
                </div>
            </div>
        </div>
        <div class="divInfo">
            <div class="divInfoblack">
                <div class="divInfoTopList">
                    <div class="listLeft">
                        <div class="navtitle">
                            课程联排详细列表
                        </div>
                    </div>
                    <div class="listRight">
                        <ul>
                            <li class="navstyle1">
                                <input type="checkbox" name="chkselect" id="chkselect" onclick="skySelectCheckList();" />
                                <label for="chkselect">全选</label>
                            </li>
                            <li class="navstyle2">

                                <%--<asp:LinkButton ID="LnkBAdd" runat="server" OnClick="SkyLnkBAMD_Click">添加</asp:LinkButton>--%>
                                  <a onclick= "javascript:opJsTree('txtCNumber','txtSkyTID');;return false;" href="javascript:void(0);" >选择</a>
                            </li>
                            <li class="navstyle3">
                                <asp:LinkButton ID="LnkBEdit" runat="server" OnClick="SkyLnkBAMD_Click" Enabled="false">编辑</asp:LinkButton>
                            </li>
                            <li class="navstyle4">
                                <asp:LinkButton ID="LnkBDelete" runat="server" OnClick="SkyLnkBAMD_Click"  Enabled="false">删除</asp:LinkButton>
                            </li>
                            <li class="navstyle5">
                                <asp:LinkButton ID="LnkBExcel" runat="server" OnClick="SkyLnkBAMD_Click">导出</asp:LinkButton>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="divInfo">
            <div class="divInfoContext">
                <asp:Repeater runat="server" ID="rptInfo">
                    <HeaderTemplate>
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" onmouseover="changeto()" onmouseout="changeback()">
                            <tr class="tablisttitle">
                                <td width="4%"><%=cHTMLFx%></td>
                                <td>序号</td>
                                <td>班级名称</td>
                                <td>课程编号</td>
                                <td>课程名称</td>

                                <td>课程类型</td>
                                <td>学习类型</td>
                                <td>课程学时</td>
                                <td>联排数量</td>




                            </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr class="tablisttr">
                            <td>
                                <asp:CheckBox runat="server" ID="chkselect" ToolTip='<%#Eval("ID") %>' /></td>
                            <td><%#Eval("ID")%></td>
                            <td><%#Eval("SkyCName")%></td>
                            <td><%#Eval("CourseID")%></td>
                            <td><%#Eval("CourseName")%></td>

                            <td><%#Eval("CourseTypeName")%></td>
                            <td><%#Eval("CourseSTypeName")%></td>
                            <td><%#Eval("CourseHours")%></td>
                            <td><%#Eval("CNumber")%></td>


                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
            </div>
        </div>
        <div class="divInfoColor">
            <webdiyer:AspNetPager ID="Pager" runat="server" AlwaysShow="True" OnPageChanged="Pager_PageChanged"
                ShowCustomInfoSection="Left" ShowPageIndexBox="Always" ShowPageIndex="False"
                CustomInfoHTML="共 <B>%PageCount%</B> 页，当前为第 <B>%CurrentPageIndex%</B> 页，每页 <B>%PageSize%</B> 条"
                SubmitButtonText="" FirstPageText="首页" LastPageText="尾页"
                LayoutType="Table" NextPageText="后一页" PrevPageText="前一页" ShowMoreButtons="False"
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到"
                CustomInfoTextAlign="Left" HorizontalAlign="Right">
            </webdiyer:AspNetPager>
        </div>
    </form>
</body>
</html>
