<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/SiteMenu.Master" AutoEventWireup="true" CodeBehind="BS_UploadSubName.aspx.cs" Inherits="Project25175.BS_UploadSubName" %>
<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 DoubleUploadClick() {
            document.getElementById('<%=btnUp.ClientID %>').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="row">
			<div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->

				<div class="row-fluid">
					<div class="span12">
						<div class="widget-box">
							<div class="widget-header widget-header-blue widget-header-flat">
								<h4 class="lighter">导入向导(<asp:Label ID="LabNavigoNo" runat="server"></asp:Label>)</h4>
							</div>

							<div class="widget-body">
								<div class="widget-main">
                                    <asp:Panel ID="PanelUpload" runat="server">    
                                        <div class="row col-xs-12">                             
                                            <%--<input type="file" id="IdFile1" />
									        <input multiple="" type="file" id="IdFile2" />--%>
                                            <asp:RadioButton ID="Rbt1" runat="server" GroupName="UploadType" Text="开课文件" 
                                                Checked="True" />
                                        </div>
                                        <div class="row col-xs-12">
                                            <div class="btn-toolbar">
											    <div class="btn-group">
												    <button data-toggle="dropdown" class="btn btn-info btn-sm dropdown-toggle">
													    Excel模板范例文件
													    <span class="icon-caret-down icon-on-right"></span>
												    </button>
												    <ul class="dropdown-menu dropdown-info pull-right">
													    <li>
														    <a href="../LoadExcelDemo/开课信息导入模板.xlsx" target="_blank">开课信息导入模板</a>
													    </li>
												    </ul>
											    </div>
                                            </div>
                                        </div>
                                        <div class="row col-xs-12">
                                            <asp:FileUpload ID="FileUploadExcel" runat="server" />
									        <hr />
                                        </div>
									    <div class="row-fluid wizard-actions">
                                            <asp:Button ID="btnUp" runat="server" Text="读取文件" onclick="btnUp_Click" CssClass="hidden" />
										    <button class="btn btn-success btn-next" type="button" onclick="DoubleUploadClick()" data-action="reload">
											    读取资料
											    <i class="icon-arrow-right icon-on-right"></i>
										    </button>
									    </div>
                                    </asp:Panel>

                                    <asp:Panel ID="PanelData" runat="server">
                                        <div class="input-group col-xs-12">
                                            <div class="form-group col-xs-4">
                                                <label class="col-sm-4 control-label no-padding-right">专业</label>
                                                <asp:DropDownList ID="DDLProfessionID_Add" runat="server" CssClass="col-xs-8"
                                                    AutoPostBack="True" 
                                                    onselectedindexchanged="DDLProfessionID_Add_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="form-group col-xs-4">
                                                <label class="col-sm-4 control-label no-padding-right">学年</label>
                                                <asp:DropDownList ID="DDLGradeTermID_Add" runat="server" CssClass="col-xs-8"
                                                    AutoPostBack="True" 
                                                    onselectedindexchanged="DDLGradeTermID_Add_SelectedIndexChanged">
                                                </asp:DropDownList>
                                            </div>
                                            <div class="form-group col-xs-4">
                                                <label class="col-sm-4 control-label no-padding-right">学期</label>
                                                <asp:DropDownList ID="DDLTermID_Add" runat="server" CssClass="col-xs-8">
                                                </asp:DropDownList>
                                            </div>                                                
                                        </div>

                                        <asp:GridView ID="GridView1" runat="server" 
                                            CssClass="table table-striped table-bordered table-hover"  >
                                            <Columns>                
                                            </Columns>
                                        </asp:GridView>
                                        <hr />
									    <div class="row-fluid wizard-actions">
                                            <asp:Button ID="btnSave" runat="server" Text="保存" onclick="btnSave_Click" CssClass="hidden" />
										    <a type="button" class="btn btn-prev" href="BS_UploadSubName.aspx?PageCode=<%=PageCode %>">
											    <i class="icon-arrow-left"></i>
											    返回
										    </a>
										    <button class="btn btn-success btn-next" type="button" id="btsave">
											    保存资料
											    <i class="icon-save icon-on-right"></i>
										    </button>
									    </div>
                                    </asp:Panel>
								</div> <!-- /widget-main -->
							</div> <!-- /widget-body -->
						</div>
					</div>
				</div>

			</div><!-- /.col -->
		</div>


        <div class="row">
	        <div class="col-xs-12">
		        <div class="table-responsive">
                    
		        </div><!-- /.table-responsive -->
	        </div><!-- /span -->
        </div>

</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 -->
    <script type="text/javascript" src="../assets/js/jquery-ui-1.10.3.full.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($) {

//	    		$('#IdFile2 , #ContentPlaceHolder1_FileUploadExcel').ace_file_input({
//			no_file:'No File ...',
//			btn_choose:'Choose',
//			btn_change:'Change',
//			droppable:false,
//			onchange:null,
//			thumbnail:false 
//				});

	    $('#IdFile1,#<%=FileUploadExcel.ClientID %>').ace_file_input({
			style:'well',
			btn_choose:'点击此处选择一个Excel文件',
			btn_change:null,
			no_icon:'icon-cloud-upload',
			droppable:true,
			thumbnail:'small',
			preview_error : function(filename, error_code) {
			}
			
		}).on('change', function(){
		});


        //遮罩
        $('#btsave').on('click', function (e) {
            if (document.getElementById('<%=btnSave.ClientID %>') != null) {
                bootbox.dialog({
                    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('<%=btnSave.ClientID %>').click();
            }
        });

});
		</script>

</asp:Content>
