<%@ Page Language="C#" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_ZGPrintCard " Codebehind="KS.ZGPrintCard.aspx.cs" %>

<!DOCTYPE html>
<html>
<head runat="server">
    <title>打印准考证</title>
    <script src="../../ks_inc/jQuery.js"></script>
    <script src="../../ks_inc/Kesion.Common.js"></script>
     <link href="../../admin/style/Admin_Style.CSS" rel="stylesheet" type="text/css" />
    <style type="text/css">
	body{margin:0px;padding:0px;font-size:12px;}
	*{margin:0px;padding:0px;}
    li{list-style:none}

/*准考证*/
.ExamCard{float:left;width:400px; position:relative; font-weight:bold;line-height:30px;border:#2B467C solid 1px;border-top:0px;border-bottom:4px solid #2B467C;  background:#fefef7;margin-bottom:20px;margin-left:10px;}
.ExamCard .ItemName{height:30px;line-height:30px;background-color:#2B467C;color:#ffffff;padding-left:10px;}
.ExamCard .ItemList{height:60px;line-height:60px;font-size:18pt;font-family:黑体;text-align:center;font-weight:bold;}
.ExamCard ul LI{width:250px;height:30px;line-height:30px; border-bottom:#2B467C dashed 1px;margin-left:10px;padding-left:10px;}
.ExamCard .R{width:100px;height:100px; position:absolute;right:15px;top:95px;}



   @media print {     
          .noprint{display: none; }   
          
    }  
    
    
    

       
    </style>

</head>
<body>
    <form id="form1" runat="server">

    <div class="noprint topbar" style="height:40px;line-height:40px;margin-bottom:20px;">
     <input type="button" class="button" value="开始打印" onClick="windown:print()" />
    </div>


<asp:Repeater ID="Repeater1" runat="server"  >
          <HeaderTemplate>
          </HeaderTemplate>
         <ItemTemplate>
            <div class="ExamCard">
                            <div class="ItemName">
                                <%# Eval("ItemName") %>
                            </div>
                            <div class="ItemList">
                                准考证号：<%# Eval("CardNum") %></div>
                            <ul>
                                <li>登录名：<%# Eval("UserName") %></li>
                                <li>姓&nbsp;&nbsp;名：<%# Eval("RealName") %></li>
                                <li>培训期次：<%# GetDepartMentName(Convert.ToString(Eval("username")))%></li>
                                <li>科&nbsp;&nbsp;&nbsp;&nbsp;目：<%# Eval("Subject") %></li>
                                <li style="width:365px">公&nbsp;&nbsp;&nbsp;&nbsp;司：<%# Eval("Company") %></li>
                                <li style="width:365px;border:0px;">考试时间：<%# Eval("BeginDate") %> — <%# Eval("EndDate") %></li>
                            </ul>
                            <div class="R">
                                <img width="100" height="100" src="<%# Eval("UserFace") %>" onerror="this.src='../../SysImg/face/<%# Convert.ToString(Eval("Sex"))=="男"?"boy.jpg":"girl.jpg"%>';" /></div>
                            
                        </div>
             
         </ItemTemplate>
          <FooterTemplate>
            <div style="display:<%# bool.Parse((Repeater1.Items.Count==0).ToString())?"":"none"%>">
             没有可打印的准考证！！！
             </div>
          </FooterTemplate>
        </asp:Repeater>

    <div class="noprint">
     <KS:Page ID="Page1" runat="server" />
    <script type="text/javascript">
        showtips('<span class="state"><strong>打印注意事项： </strong><br/></span>建议使用A4纸，一张A4纸可以打印8张准考证；<br/>把浏览器的页面设置量的 上和下改成0,页眉页脚都要设置为空,IE浏览器工具-〉高级选项里要设置为允许打印背景。');
		</script>
    </div>
    </form>
</body>
</html>
