<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/SiteMenu.Master" AutoEventWireup="true" CodeBehind="BS_Teacher.aspx.cs" Inherits="Project25175.BS_Teacher" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link rel="stylesheet" href="../assets/css/jquery-ui-1.10.3.full.min.css" />

    <script type="text/javascript">
        function DoubleAddClick() {
            document.getElementById("ContentPlaceHolder1_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="ContentPlaceHolder1" 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="<%=PageIcon %>"></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:Button ID="BtMenuAdd" runat="server" OnClick="BtMenuAdd_Click" Text="添加" CssClass="btn btn-primary btn-sm" /> 
                <asp:DropDownList ID="DDLGrade" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DDLGrade_SelectedIndexChanged">                       
                </asp:DropDownList>
                <asp:DropDownList ID="DDLClass" runat="server">                       
                </asp:DropDownList>
                <asp:TextBox runat="server" ID="TxtSearchUser" placeholder="姓名..." CssClass="input-mini"></asp:TextBox>
                <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" id="idsearch" title="查找"></i></a>
				</span>
            </div>
        </div>

        <asp:Panel runat="server" Visible="false" ID="PanelAdd">
            <div class="row clearfix form-actions" id="DivAdd">
                <div class="space-10"></div>
                <div class="form-group col-md-offset-2 col-xs-8" >
					<label class="col-sm-3 control-label no-padding-right">姓名查询</label>
                    <div class="space-2"></div>
                    <%--<div class="nav-search form-search">--%>
                    <div class="form-search">
                        <span class="input-icon">
						    <asp:TextBox runat="server" placeholder="Search ..." CssClass="nav-search-input" id="TxtSearch" ></asp:TextBox>
						    <i class="icon-search nav-search-icon"></i>
					    </span><asp:Button ID="BT_FindTea" runat="server" Text="查找" 
                            CssClass="input-icon btn-blue" onclick="BT_FindTea_Click" />
                    </div>
                </div>
                <div class="space-4"></div>
	            <div class="form-group col-md-offset-2 col-xs-8" >
					<label class="col-sm-3 control-label no-padding-right">老师名称</label>
                    <div class="space-2"></div>
	                <%--<asp:TextBox runat="server" id="TxtTeaName_Add"  CssClass="col-xs-6"/>--%>
                    <asp:DropDownList ID="DDLTeaName_Add" runat="server" CssClass="col-xs-6">
                    </asp:DropDownList>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-md-offset-2 col-xs-8">
                    <label class="col-sm-3 control-label no-padding-right">入学年份</label>
                    <div class="space-2"></div>
                    <asp:DropDownList ID="DDLGradeName_Add" runat="server" CssClass="col-xs-6"
                        AutoPostBack="True" 
                        onselectedindexchanged="DDLGradeID_Add_SelectedIndexChanged">
                    </asp:DropDownList>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-md-offset-2 col-xs-8">
                    <label class="col-sm-3 control-label no-padding-right">班级名称</label>
                    <div class="space-2"></div>
                    <asp:DropDownList ID="DDLClassName_Add" runat="server" CssClass="col-xs-6">
                    </asp:DropDownList>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-md-offset-2 col-xs-8">
                    <label class="col-sm-3 control-label no-padding-right">状态</label>
                    <div class="space-2"></div>
                    <asp:DropDownList ID="DDLState_Add" runat="server" CssClass="col-xs-2">
                        <asp:ListItem Value="Y"></asp:ListItem>
                        <asp:ListItem Value="N"></asp:ListItem>
                    </asp:DropDownList>
                </div>
                <div class="space-4"></div>
                <div class="form-group col-md-offset-2 col-xs-8">
                    <label class="col-sm-3 control-label no-padding-right">备注</label>
                    <div class="space-2"></div>
                    <asp:TextBox ID="TxtComment_Add" runat="server" TextMode="MultiLine" 
                        CssClass="col-xs-6"></asp:TextBox>
                </div>
                <div class="space-6"></div>
				<div class="form-group col-xs-12 center">
                    <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="Reset1" type="reset" value="取消"  class="btn" ><i class="icon-undo bigger-110"></i>
					    Reset
                    </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" 
                            OnRowDataBound="GridView1_RowDataBound"
                            OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating" 
                            OnRowCancelingEdit="GridView1_RowCancelingEdit" AllowPaging="True" 
                            OnPageIndexChanging="GridView1_PageIndexChanging" 
                            onrowdeleting="GridView1_RowDeleting" >
                            <Columns>
                                <%--<asp:TemplateField HeaderText="ID">
                                    <ItemTemplate>
                                        <asp:Label ID="LabID" runat="server" Text='<%# Bind("Id") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="班主任名称">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TxtClassName" runat="server" CssClass="col-xs-12" 
                                            Text='<%#Bind("ClassName") %>'></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="LabClassName" runat="server" Text='<%# Bind("ClassName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>--%>
                                <asp:BoundField DataField="Id" HeaderText="ID" ReadOnly="True"  >
                                    <HeaderStyle CssClass="hidden" />
                                    <ItemStyle CssClass="hidden" />
                                </asp:BoundField>
                                <%--<asp:BoundField DataField="TeaName" HeaderText="班主任名称" ReadOnly="True"/>--%>
                                <asp:TemplateField HeaderText="班主任姓名">
                                    <EditItemTemplate>
                                        <asp:Label ID="LabTeaName" runat="server" Text='<%# Bind("TeaName") %>'></asp:Label>
                                        <asp:Label ID="LabTID" runat="server" Text='<%# Bind("TID") %>' Visible="false"></asp:Label>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="LabTeaName" runat="server" Text='<%# Bind("TeaName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="入学年份">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DDLGradeName" runat="server" CssClass="col-xs-12" 
                                            AutoPostBack="True" onselectedindexchanged="DDLGradeName_SelectedIndexChanged">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="LabGradeName" runat="server" Text='<%# Bind("GradeName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="班级">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DDLClassName" runat="server" CssClass="col-xs-12">
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="LabClassName" runat="server" Text='<%# Bind("ClassName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="状态">
                                    <EditItemTemplate>
                                        <asp:DropDownList ID="DDLState" runat="server" CssClass="col-xs-12" 
                                            SelectedValue='<%# Bind("state")%>'>
                                            <asp:ListItem Value="Y"></asp:ListItem>
                                            <asp:ListItem Value="N"></asp:ListItem>
                                        </asp:DropDownList>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%#Bind("state") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="备注">
                                    <EditItemTemplate>
                                        <asp:TextBox ID="TxtComment" runat="server" TextMode="MultiLine" Text='<%#Bind("Comment") %>' CssClass="col-xs-12"></asp:TextBox>
                                    </EditItemTemplate>
                                    <ItemTemplate>
                                        <asp:Label ID="LabComment" runat="server" Text='<%#Bind("ShortComment") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:CommandField ShowEditButton="True" />
                                <asp:CommandField ShowDeleteButton="True" />
                            </Columns>
                            <PagerSettings Mode="NumericFirstLast" />
                        </asp:GridView>
		            </div><!-- /.table-responsive -->
	            </div><!-- /span -->
            </div>
        </asp:Panel>
    </div>
    
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder_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 -->
    <!-- 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 (e) {
            //查询
            $("#idsearch").on('click', function (e) {
                document.getElementById('<%=BtSearch.ClientID %>').click();
            });
        })

    </script>
</asp:Content>
