<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="yuekaoout.aspx.cs" EnableEventValidation="false"  Inherits="jiaowu.jiaowu.yuekaoout" %>

<!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 runat="server">
    <title></title>
     <style media=print> 
.Noprint{display:none;} 
.PageNext{page-break-after: always;} 
</style>
    <style type="text/css" id="style1">
        .style1
        {
            font-size: x-large;
            text-align: center;
        }
        .style2
        {
            text-align: center;
        }
    </style>
     <script src="../js/LodopFuncs.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" runat="server">
    
            <div class="Noprint">
           <input id="Button1" type="button" value="打印预览" onclick="javascript:prn1_preview()"/><input id="Button2" type="button"
        value="直接打印" onclick="javascript:prn1_print()"/><input id="Button3" type="button" value="选择打印机" onclick="javascript:prn1_printA()"/>
        <asp:LinkButton ID="lbtnout" runat="server" onclick="lbtnout_Click">下载</asp:LinkButton>
      </div>
    <%string fenxiao = "";
        System.Data.DataTable tbf = SqlHelper.dataTable("select * from fenxiao where id=" +xxsoft_user.userclass.getfenxiao() + "");
      if (tbf.Rows.Count > 0)
      {
          fenxiao = tbf.Rows[0]["fenxiao"].ToString();
      } %>
	<div id="div1">
                     <div align="center"> <strong><span class="style1"><%=fenxiao %>驾校机动车驾驶人申请受理单</span></strong></div>  
                     <br />
                    受理时间：<%=DateTime.Now.ToString("yyyy-MM-dd") %>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 经办人：<%=xxsoft_user.userclass.getuserxm() %><br />
                    <br />
					</div>
<div  id="page1" class="jp-page">
					<asp:GridView ID="gdv" runat="server" AllowPaging="True" 
            AllowSorting="True" AutoGenerateColumns="False" OnPreRender="gdv_PreRender"
                         Width="100%" EmptyDataText="没有或没有符合条件的学生约考息！">
                        <HeaderStyle/>
                        <Columns>
                        <asp:TemplateField HeaderText="序号">
                            <ItemTemplate>
                            </ItemTemplate>
                            </asp:TemplateField>  
                            <asp:BoundField DataField="leixing" HeaderText="报考类型"/>  
                            <asp:TemplateField HeaderText="姓名">
                            <ItemTemplate><%#Eval("stuxm").ToString() %>
                            </ItemTemplate></asp:TemplateField>     
                            <asp:BoundField DataField="card" HeaderText="身份证号"/>                    
                            <asp:BoundField DataField="chexing" HeaderText="报考车型"/> 
                            <asp:BoundField DataField="tel" HeaderText="电话"/>  
                            <asp:BoundField DataField="kemu" HeaderText="约考科目"/>   
                            <asp:TemplateField HeaderText="发票号码">
                            <ItemTemplate>
                            </ItemTemplate>
                            </asp:TemplateField>  
                            <asp:TemplateField HeaderText="发票代码">
                            <ItemTemplate>
                            </ItemTemplate>
                            </asp:TemplateField>  
                            <asp:TemplateField HeaderText="开票金额">
                            <ItemTemplate>
                            </ItemTemplate>
                            </asp:TemplateField> 
                            <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                            </ItemTemplate>
                            </asp:TemplateField>   
                        </Columns>                        
                        <PagerSettings Visible="False" />
                        <RowStyle HorizontalAlign="Center" Height="25px" />
                    </asp:GridView>
    </div>
     <script language="javascript" type="text/javascript">
         var LODOP; //声明为全局变量 
         function prn1_preview() {
             CreateOneFormPage();
             LODOP.PREVIEW();
         };
         function prn1_print() {
             CreateOneFormPage();
             LODOP.PRINT();
         };
         function prn1_printA() {
             CreateOneFormPage();
             LODOP.PRINTA();
         };
         function CreateOneFormPage() {
             LODOP = getLodop();
             var strBodyStyle = "<style>" + document.getElementById("style1").innerHTML + "</style>";
             var strFormHtml = strBodyStyle + "<body>" + document.getElementById("div1").innerHTML + document.getElementById("page1").innerHTML + "</body>";
             LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_表单一");
             LODOP.SET_PRINT_STYLE("FontSize", 18);
             LODOP.SET_PRINT_STYLE("Bold", 1);
             // LODOP.ADD_PRINT_TEXT(50, 231, 260, 39, "打印页面部分内容");
             LODOP.ADD_PRINT_HTM(10, 10, "100%", "100%",strFormHtml);
             LODOP.NewPageA();
         };
</script> 
    </form>
</body>
</html>
