<%@ Page Title="" Language="C#" MasterPageFile="~/Student/SiteStuMenu.Master" AutoEventWireup="true" CodeBehind="ApplySub.aspx.cs" Inherits="Project25175.ApplySub" %>
<asp:Content ID="Content1" ContentPlaceHolderID="StuContentPlace_Header" runat="server">
    <link rel="stylesheet" href="../assets/css/jquery-ui-1.10.3.full.min.css" />
    <script type="text/javascript">
        function DoubleAddClick() {
            document.getElementById("StuContentPlace_BT_Add").click();
        }

        //后台调用,区分提示信息底色
        //Danger,Info
        function ChangeMsgClass(MsgType) {
            if (MsgType == "Danger") {
                DivMsg.className = 'alert alert-danger';
            }
            else {
                DivMsg.className = 'alert alert-info';
            }
        }
    </script>
    
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="StuContentPlace" runat="server">
    
    <div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try { ace.settings.check('breadcrumbs', 'fixed') } catch (e) { }
		</script>
		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
                申请课程
			</li>
		</ul>
	</div>

    <div class="page-content">
        <div class="row col-xs-12">
            <div id="DivMsg" class="alert alert-info">
                <i class="icon-hand-right"></i>
                <asp:Label ID="LabMsg" runat="server" Text=" "></asp:Label>
			    <button class="close" data-dismiss="alert">
                <i class="icon-remove"></i>
                </button>
            </div>
        </div>

        <div class="page-header">
            <div class="col-xs-12 widget-box">
                <asp:Button ID="BtMenuList" runat="server" OnClick="BtMenuList_Click" Text="全校课程列表" CssClass="btn btn-info btn-sm" />
                <asp:DropDownList ID="DDLSchTimeID" runat="server">                       
                </asp:DropDownList>
                <asp:Button ID="BtSearch" runat="server"  CssClass="btn btn-success btn-sm hidden" 
                    Text="查找" onclick="BtSearch_Click" />
				<span>
					<a href="#" data-action="reload"><i class="icon-search nav-search-icon green bigger-140 sender" id="idsearch" title="查找"></i></a>
				</span> 
            </div>
        </div>

        <asp:Panel runat="server" Visible="false" ID="PanelAdd">
            <div class="row"><div class="col-xs-12" ><div class="space-4"><asp:TextBox runat="server" id="TxtID" Visible="false"/></div></div></div>
            <div class="row">
                <div class="space-4"></div>
	            
                <div class="form-group col-xs-12" >
					<label class="col-xs-2 control-label no-padding-right">选课简述</label>
	                <asp:TextBox runat="server" id="TxtSubTitle"  CssClass="col-xs-10" Enabled="false"/>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">课程</label>
                    <asp:TextBox ID="TxtSubNameID" runat="server" Visible="false"></asp:TextBox>
                    <asp:TextBox ID="TxtSubName" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                    <label class="col-xs-2 control-label no-padding-right">老师</label>
                    <asp:TextBox ID="TxtTeacher" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">上课学年</label>
                    <asp:TextBox ID="TxtSchTime" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                    <label class="col-xs-2 control-label no-padding-right">上课地点</label>
                    <asp:TextBox ID="TxtPlace" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">报名时间</label>
                    <div class="col-xs-4">
                        <asp:TextBox ID="TxtStuApplyS" runat="server" CssClass="col-xs-12" Enabled="false"></asp:TextBox>
                        <asp:TextBox ID="TxtStuApplyE" runat="server" CssClass="col-xs-12" Enabled="false"></asp:TextBox>
                    </div>
                    <label class="col-xs-2 control-label no-padding-right">考试时间</label>
                    <div class="col-xs-4">
                        <asp:TextBox ID="TxtExamDate" runat="server" CssClass="col-xs-12" Enabled="false"></asp:TextBox>
                    </div>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">报名方式</label>
                    <asp:DropDownList ID="DDLSignType" runat="server" CssClass="col-xs-4" Enabled="false">
                        <asp:ListItem Value="0">网上报名</asp:ListItem>
                        <asp:ListItem Value="1">线下报名</asp:ListItem>
                        <asp:ListItem Value="2">不限</asp:ListItem>  
                    </asp:DropDownList>
                    <label class="col-xs-2 control-label no-padding-right">课程性质</label>
                    <asp:TextBox ID="TxtSubProperty" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">开课组系</label>
                    <asp:TextBox ID="TxtGroup" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                    <label class="col-xs-2 control-label no-padding-right">校区代码</label>
                    <asp:TextBox ID="TxtSchArea" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">录取方式</label>
                    <asp:DropDownList ID="DDLEnroll" runat="server" CssClass="col-xs-4" Enabled="false">
                        <asp:ListItem Value="0">按报名先后</asp:ListItem>
                        <asp:ListItem Value="1">由老师决定</asp:ListItem>
                    </asp:DropDownList>
                    <label class="col-xs-2 control-label no-padding-right">预定教材</label>
                    <asp:TextBox ID="TxtTextBook" runat="server" CssClass="col-xs-4" Enabled="false"></asp:TextBox>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">评分方式</label>
                    <asp:DropDownList ID="DDLEndType" runat="server" CssClass="col-xs-4" Enabled="false">
                        <asp:ListItem Value="C">学分</asp:ListItem>
                        <asp:ListItem Value="R">等级</asp:ListItem>
                    </asp:DropDownList>
                    <label class="col-xs-2 control-label no-padding-right">限制性别</label>
                    <asp:DropDownList ID="DDLSexID" runat="server" CssClass="col-xs-4" Enabled="false">
                        <asp:ListItem Value="2">不限</asp:ListItem>
                        <asp:ListItem Value="1">男</asp:ListItem>
                        <asp:ListItem Value="0">女</asp:ListItem>                        
                    </asp:DropDownList>
                </div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">学时</label>
                    <asp:TextBox ID="TxtSubPeriod" runat="server" CssClass="col-xs-2" Enabled="false"></asp:TextBox>
                    <label class="col-xs-2 control-label no-padding-right">限定人数</label>
                    <asp:TextBox ID="TxtStuQuantity" runat="server" CssClass="col-xs-2" Enabled="false"></asp:TextBox>
                    <label class="col-xs-2 control-label no-padding-right">已报名</label>
                    <asp:TextBox ID="TxtApplyQuantity" runat="server" CssClass="col-xs-2" Enabled="false"></asp:TextBox>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">上课学年</label>
                    <asp:CheckBoxList ID="CBLGrade" runat="server" RepeatDirection="Horizontal" Enabled="false">
                    </asp:CheckBoxList>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">上课节次</label>
                    <div class="col-xs-10">
                        <div class="col-xs-5">
                            <div class="col-xs-4">
                                <h4>周一</h4>
                                <asp:CheckBoxList ID="CBLWeekDay1" runat="server" Enabled="false">
                                </asp:CheckBoxList>
                            </div>
                            <div class="col-xs-4">
                                <h4>周二</h4>
                                <asp:CheckBoxList ID="CBLWeekDay2" runat="server" Enabled="false">
                                </asp:CheckBoxList>
                            </div>
                            <div class="col-xs-4">
                                <h4>周三</h4>
                                <asp:CheckBoxList ID="CBLWeekDay3" runat="server" Enabled="false">
                                </asp:CheckBoxList>
                            </div>
                        </div>
                        <div class="col-xs-5">
                            <div class="col-xs-4">
                                <h4>周四</h4>
                                <asp:CheckBoxList ID="CBLWeekDay4" runat="server" Enabled="false">
                                </asp:CheckBoxList>
                            </div>
                            <div class="col-xs-4">
                                <h4>周五</h4>
                                <asp:CheckBoxList ID="CBLWeekDay5" runat="server" Enabled="false">
                                </asp:CheckBoxList>
                            </div>
                        
                            <div class="col-xs-4">
                                <h4>周六</h4>
                                <asp:CheckBoxList ID="CBLWeekDay6" runat="server" Enabled="false">
                                </asp:CheckBoxList>
                            </div>
                        </div>
                        <div class="col-xs-2">
                            <div class="col-xs-12">
                                <h4>周日</h4>
                                <asp:CheckBoxList ID="CBLWeekDay7" runat="server" Enabled="false">
                                </asp:CheckBoxList>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">限制要求</label>
                    <asp:CheckBoxList ID="CBLLimits" runat="server" Enabled="false">
                    </asp:CheckBoxList>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-xs-12">
                    <label class="col-xs-2 control-label no-padding-right">备注</label>
                    <div class="space-2"></div>
                    <asp:TextBox ID="TxtComment" runat="server" CssClass="col-xs-10" TextMode="MultiLine" Enabled="false"></asp:TextBox>
                </div>

                <div class="space-6"></div>
				<div class="form-group text text-center col-xs-12">
                    <asp:Button ID="BT_Add" runat="server" Text="确认" 
                            CssClass="btn btn-info icon-ok bigger-110 hidden " OnClick="BT_Add_Click" />
                    <button class="btn btn-info" type="button" onclick="DoubleAddClick()">
						<i class="icon-ok bigger-110"></i>
						申请此课程
					</button>
                    <Button id="Button3" type="reset" value="返回"  class="btn" onclick="javascript:history.go(-1)"><i class="icon-backward bigger-110"></i>
					    返回
                    </Button>
                </div>
            </div>
        </asp:Panel>

        <asp:Panel runat="server" Visible="false" ID="PanelData">
            <div class="row">
	            <div class="col-xs-12">
		            <div class="table-responsive">
                        <asp:GridView ID="GridView1" runat="server" 
                            CssClass="table table-striped table-bordered table-hover" 
                            AutoGenerateColumns="False" DataKeyNames="ID" AllowPaging="True" 
                            OnPageIndexChanging="GridView1_PageIndexChanging" >
                            <Columns>
                                <%--<asp:BoundField DataField="ID" HeaderText="ID" />--%>
                                <asp:HyperLinkField DataNavigateUrlFields="ID" 
                                    DataNavigateUrlFormatString="ViewSub.aspx?ID={0}" DataTextField="SubName" 
                                    HeaderText="课程名称" />
                                <%--<asp:TemplateField HeaderText="课程名称">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("SubName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Button ID="BtSubName" runat="server" Text='<%# Bind("SubName") %>' 
                                            CssClass="text text-success" onclick="BtSubName_Click"/>
                                    </ItemTemplate>
                                </asp:TemplateField> --%>                               
                                <asp:BoundField DataField="TeaName" HeaderText="任课老师" />
                                <asp:BoundField DataField="SchTimeName" HeaderText="上课学年" />
                                <asp:BoundField DataField="SubTitle" HeaderText="描述" />
                                <asp:BoundField DataField="Period" HeaderText="学时" />
                                <asp:BoundField DataField="StuQuantity" HeaderText="限定人" />
                                <asp:BoundField DataField="ApplyQuantity" HeaderText="已报名" />
                                <asp:BoundField DataField="State" HeaderText="状态" />
                            </Columns>
                            <PagerSettings Mode="NumericFirstLast" />
                        </asp:GridView>
		            </div><!-- /.table-responsive -->
	            </div><!-- /span -->
            </div>
        </asp:Panel>
</div>
    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StuContentPlace_Footer" runat="server">

    <script type="text/javascript" src="../assets/js/jquery-2.0.3.min.js"></script>

	<script type="text/javascript">
		window.jQuery || document.write("<script src='../assets/js/jquery-2.0.3.min.js'>" + "<" + "/script>");
	</script>

	<script type="text/javascript">
		if ("ontouchend" in document) document.write("<script src='../assets/js/jquery.mobile.custom.min.js'>" + "<" + "/script>");
	</script>
	<script type="text/javascript" src="../assets/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="../assets/js/typeahead-bs2.min.js"></script>

	<!-- page specific plugin scripts -->
	<!-- ace scripts -->

	<script type="text/javascript" src="../assets/js/ace-elements.min.js"></script>
	<script type="text/javascript" src="../assets/js/ace.min.js"></script>

    <script type="text/javascript">
        jQuery(function ($) {
            $("#idsearch").on('click', function (e) {
                document.getElementById('<%=BtSearch.ClientID %>').click();
            });

        });
    </script>

</asp:Content>
