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

<%@ 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 type="text/javascript" language="javascript">
        function UsSubmit(s) {
            //alert(s);
            var m = $(s).parent().html();
            var l = m.indexOf('非默认学期')
            if (l > 0) {
                ;
                var title = $(s).parent().parent().find(".fColorBlue").html();

                return window.confirm("您确实要设置[" + title + "]为默认学期吗？请注意：修改默认学期后，课程，成绩都是按照默认学期显示，此步骤非常重要。");
            }
            else {
                return false;
            }

        }
    </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="txtSkyTID">学期编号：</label><asp:TextBox ID="txtSkyTID" runat="server" ToolTip="学期编号"></asp:TextBox></p>
                        <p>
                            <label for="txtSkyTName">学期名称：</label><asp:TextBox ID="txtSkyTName" runat="server" ToolTip="学期名称"></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>
                            </li>
                            <li class="navstyle3">
                                <asp:LinkButton ID="LnkBEdit" runat="server" OnClick="SkyLnkBAMD_Click">编辑</asp:LinkButton>
                            </li>
                            <li class="navstyle4">
                                <asp:LinkButton ID="LnkBDelete" runat="server" OnClick="SkyLnkBAMD_Click">删除</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">
                            <tr class="tablisttitle">
                                <td width="4%"><%=cHTMLFx%></td>
                                <td>序号</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") %>' Enabled='<%#Eval("IsDefault").ToString()=="1"?true:false %>' /></td>
                            <td><%#Eval("ID")%></td>
                            <td><%#Eval("SkyTID")%></td>
                            <td class="fColorBlue"><%#Eval("SkyTName")%></td>
                            <td class="fColorBlue"><%--<%#Eval("IsDefaultName")%>--%>


                                <asp:LinkButton runat="server" ID="lnkBSkyTName" Text='<%#Eval("IsDefaultName")%>' ToolTip='<%#Eval("SkyTName")%>'
                                    OnClientClick="return UsSubmit(this);" OnClick="SkyLnkBAMD_Click" CommandArgument='<%#Eval("id") %>'></asp:LinkButton>
                            </td>
                            <td><%#Eval("ShowID")%></td>
                            <td><%#Eval("StartDate")%></td>
                            <td><%#Eval("EndDate")%></td>

                            <td><%#UsToolsDateFormat(Eval("CreateDate"))%></td>
                            <td><%#UsToolArtUrl(pDefault.sEditUrl +"?id="+Eval("ID").ToString(), "[修改]",pDefault.sSize)%></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>
        <div class="divInfoColor">

            <span class="usHelpMessage">* 注意事项： </span>
            1、学期设置是系统最重要的地方；2、所有的课程成绩等信息的录入和查询都是针对当前学期进行的；3、当每学期完成后在切换默认学期
        </div>
    </form>
</body>
</html>
