<%@ Page Title="" Language="C#" EnableEventValidation = "false" MasterPageFile="~/Admin/SiteMenu.Master" AutoEventWireup="true" CodeBehind="BS_StudentInfo.aspx.cs" Inherits="Project25175.BS_StudentInfo" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">

    <script type="text/javascript">
        //后台调用,区分提示信息底色
        //Danger,Info
        function ChangeMsgClass(MsgType) {
            if (MsgType == "Danger") 
            {
                DivMsg.className = 'alert alert-danger';
            }
            else 
            {
                DivMsg.className = 'alert alert-info';
            }
        }

        function openwin(UrlString) {
            window.open("../Public/PrintStudent.aspx?ID=" + UrlString + "", "")
        }   

//        function preview() {
//            bdhtml = window.document.body.innerHTML;
//            sprnstr = "<!--startprint-->";
//            eprnstr = "<!--endprint-->";
//            prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
//            prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
//            window.document.body.innerHTML = prnhtml;
//            window.print();
//        }


        function printdiv(printpage) {
            var headstr = " <html> <head> <title> </title> </head> <body> ";
            var footstr = " </body> ";
            var newstr = document.all.item(printpage).innerHTML;
            var oldstr = document.body.innerHTML;
            document.body.innerHTML = headstr + newstr + footstr;
            window.print();
            document.body.innerHTML = oldstr;
            return false;
        } 

    </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="BtExport" runat="server" Text="导出" Visible="false"
                    CssClass="btn btn-success btn-sm" onclick="BtExport_Click" />
                <asp:Button ID="BtMenuPrint" runat="server" OnClick="BtMenuPrint_Click" Visible="false" Text="打印预览" CssClass="btn btn-Grey btn-sm" />
                <asp:TextBox runat="server" ID="TxtSearchUser" placeholder="姓名..." 
                    CssClass="input-mini"></asp:TextBox>
                <asp:Button ID="BtSearchStu" runat="server"  CssClass="btn btn-success btn-sm hidden" 
                    Text="查找姓名" onclick="BtSearchStu_Click" />
				<span>
					<a href="#"><i class="icon-chevron-sign-right nav-search-icon green bigger-140 sender" id="idSearchStu" title="搜索学生"></i></a>
				</span>
                <asp:DropDownList ID="DDLStudentID" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DDLStudentID_SelectedIndexChanged">                       
                </asp:DropDownList>

                <asp:DropDownList ID="DDLGradeTerm" runat="server" AutoPostBack="True" 
                    onselectedindexchanged="DDLGradeTerm_SelectedIndexChanged">                       
                </asp:DropDownList>
                <asp:DropDownList ID="DDLSubNameID" runat="server">                       
                </asp:DropDownList>
                <label class="middle">
					<input class="ace" type="checkbox" id="chkboxTotal" runat="server" />
					<span class="lbl">总分</span>
				</label>
                <asp:Button ID="BtSearch" runat="server"  CssClass="btn btn-success btn-sm hidden" 
                    Text="查找" onclick="BtSearch_Click" />
				<span>
					<a href="#"><i class="icon-search nav-search-icon green bigger-140 sender" id="idsearch" title="查找"></i></a>
				</span>

          
                <%--<input type="button" name="print" value="预览并打印" onclick="preview()">
                <input type="button" name="print" value="预览并打印" onclick="printdiv('printpage')">--%>

            </div>
        </div>
        

        <asp:Panel runat="server" Visible="false" ID="PanelData">
            <div id="printpage" class="row" >
                <div class="col-xs-12">
                    <div class="row">
                        <div class="col-xs-12">
                             <div class="table-responsive">
                                <asp:GridView ID="GridView4" runat="server" 
                                    CssClass="table table-striped table-bordered table-hover" 
                                    AutoGenerateColumns="False" >
                                    <Columns>
                                        <asp:BoundField DataField="StuName" HeaderText="姓名" />
                                        <asp:BoundField DataField="StuNumber" HeaderText="学号" />                                        
                                        <asp:BoundField DataField="StuSex" HeaderText="性别" />
                                        <asp:BoundField DataField="IDCard" HeaderText="身份证" />
                                        <asp:BoundField DataField="ClassName" HeaderText="班级" />
                                    </Columns>
                                </asp:GridView>
		                    </div>
                        </div>
                    </div>
                    <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="True" AllowPaging="False" 
                                    OnPageIndexChanging="GridView1_PageIndexChanging" 
                                    onrowcreated="GridView1_RowCreated" >
                                    <Columns>
                                    </Columns>
                                    <PagerSettings Mode="NumericFirstLast" />
                                </asp:GridView>
		                    </div><!-- /.table-responsive -->
	                    </div><!-- /span -->
                    </div>
                    <div class="row">
	                    <div class="col-xs-12">
		                    <div class="table-responsive">
                                <asp:GridView ID="GridView2" runat="server" 
                                    CssClass="table table-striped table-bordered table-hover" 
                                    AutoGenerateColumns="False" >
                                    <Columns>
                                        <asp:BoundField DataField="RewardName" HeaderText="级别" />
                                        <asp:BoundField DataField="PublishUnit" HeaderText="发证单位" />
                                        <asp:BoundField DataField="RewardContent" HeaderText="获奖信息" />
                                        <asp:BoundField DataField="StartDate" HeaderText="获奖日期" 
                                            DataFormatString="{0:d}" />
                                    </Columns>
                                </asp:GridView>
		                    </div><!-- /.table-responsive -->
	                    </div><!-- /span -->
                    </div>
                    <div class="row">
	                    <div class="col-xs-12">
		                    <div class="table-responsive">
                                <asp:GridView ID="GridView3" runat="server" 
                                    CssClass="table table-striped table-bordered table-hover" 
                                    AutoGenerateColumns="False" >
                                    <Columns>
                                        <asp:BoundField DataField="PunishName" HeaderText="处分级别" />
                                        <asp:BoundField DataField="StartDate" HeaderText="处分日期" 
                                            DataFormatString="{0:d}" />
                                        <asp:BoundField DataField="PunishmentContent" HeaderText="处分原因" />
                                        <asp:BoundField DataField="State" HeaderText="是否撤销" />
                                        <asp:BoundField DataField="RepealDate" HeaderText="撤销日期" />
                                    </Columns>
                                </asp:GridView>
		                    </div><!-- /.table-responsive -->
	                    </div><!-- /span -->
                    </div>
                </div>
            </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 -->

	<script type="text/javascript" src="../assets/js/jquery-ui-1.10.3.full.min.js"></script>
	<script type="text/javascript" src="../assets/js/jquery.ui.touch-punch.min.js"></script>

	<!-- 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" src="../assets/js/bootbox.min_25175.js"></script>

    <script type="text/javascript">

        jQuery(function ($) {
            //查询
            $('#idsearch').on('click', function (e) {
                bootbox.dialog({
                    //图片和文字提示
                    //message: "<img src='../assets/css/images/loading.gif'>"
                    //进度条提示
                   message: " <div id='progressbar'></div>"
                });

                //progressbar 进度条样式
                $("#progressbar").progressbar({
                    value: 100,
                    create: function (event, ui) {
                        $(this).addClass('progress progress-striped active')
							   .children(0).addClass('progress-bar progress-bar-success');
                    }
                });

                //执行按钮事件
                document.getElementById('<%=BtSearch.ClientID %>').click();
            });

            //查询
            $('#idSearchStu').on('click', function (e) {
                bootbox.dialog({
                    //图片和文字提示
                    //message: "<img src='../assets/css/images/loading.gif'>"
                    //进度条提示
                    message: " <div id='progressbar'></div>"
                });

                //progressbar 进度条样式
                $("#progressbar").progressbar({
                    value: 100,
                    create: function (event, ui) {
                        $(this).addClass('progress progress-striped active')
							   .children(0).addClass('progress-bar progress-bar-success');
                    }
                });

                //执行按钮事件
                document.getElementById('<%=BtSearchStu.ClientID %>').click();
            });
        });
    </script>
    

</asp:Content>
