309 lines
18 KiB
Plaintext
309 lines
18 KiB
Plaintext
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WelderCardPrint1.aspx.cs" Inherits="FineUIPro.Web.Welder.WelderCardPrint1" %>
|
||
|
||
<!DOCTYPE html>
|
||
|
||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
<head runat="server">
|
||
<title>打印焊工证</title>
|
||
<link href="../Styles/Style.css" rel="stylesheet" type="text/css" />
|
||
<script type="text/javascript" language="javascript">
|
||
function pagesetup_null() {
|
||
try {
|
||
var RegWsh = new ActiveXObject("WScript.Shell")
|
||
hkey_key = "header"
|
||
RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")
|
||
hkey_key = "footer"
|
||
RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "")
|
||
} catch (e) { }
|
||
}
|
||
//设置网页打印的页眉页脚为默认值
|
||
function pagesetup_default() {
|
||
try {
|
||
var RegWsh = new ActiveXObject("WScript.Shell")
|
||
hkey_key = "header"
|
||
RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "&w&b页码,&p/&P")
|
||
hkey_key = "footer"
|
||
RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "&u&b&d")
|
||
} catch (e) { }
|
||
}
|
||
function printpr() //预览函数
|
||
{
|
||
pagesetup_null(); //预览之前去掉页眉,页脚
|
||
document.getElementById("div1").style.display = "none";
|
||
var a = window.open('about:blank', 'Print');
|
||
a.document.write('<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>' + document.getElementById('Table5').innerHTML);
|
||
//ar WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
|
||
a.document.all.WebBrowser1.ExecWB(7, 1);
|
||
a.close();
|
||
//document.body.insertAdjacentHTML('beforeEnd', WebBrowser); //在body标签内加入html(WebBrowser activeX控件)
|
||
//WebBrowser1.ExecWB(7, 1); //打印预览
|
||
//WebBrowser1.outerHTML = ""; //从代码中清除插入的html代码
|
||
pagesetup_default(); //预览结束后页眉页脚恢复默认值
|
||
document.getElementById("div1").style.display = "block";
|
||
}
|
||
function print() //打印函数
|
||
{
|
||
pagesetup_null(); //打印之前去掉页眉,页脚
|
||
document.getElementById("div1").style.display = "none";
|
||
|
||
var WebBrowser = '<OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLASSID="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></OBJECT>';
|
||
document.body.insertAdjacentHTML('beforeEnd', WebBrowser); //在body标签内加入html(WebBrowser activeX控件)
|
||
WebBrowser1.ExecWB(6, 6); //打印
|
||
WebBrowser1.outerHTML = ""; //从代码中清除插入的html代码
|
||
pagesetup_default(); //打印结束后页眉页脚恢复默认值
|
||
document.getElementById("div1").style.display = "block";
|
||
}
|
||
</script>
|
||
</head>
|
||
<body>
|
||
<form id="form1" runat="server">
|
||
<table id="Table1" runat="server" width="100%" cellpadding="0" cellspacing="0" align="center"
|
||
border="0">
|
||
<tr>
|
||
<td style="width: 100%; background: url('../../Images/bg-1.gif')">
|
||
<div id="div1">
|
||
<table id="tabbtn" runat="server" width="100%" style="background: url('../Images/bg-1.gif')"
|
||
cellpadding="0" cellspacing="0">
|
||
<tr>
|
||
<td align="left" valign="middle" style="width: 30%; font-size: 11pt; font-weight: bold">
|
||
<asp:Image ImageUrl="~/Images/lv-1.gif" ImageAlign="AbsMiddle" ID="image15" runat="server" />
|
||
焊工证
|
||
</td>
|
||
<td align="right" valign="middle" style="width: 70%; height: 30px; border-width: 0px;">
|
||
<img src="../Images/PageSetup.gif" runat="server" id="Img2" onclick="document.all.WebBrowser.ExecWB(8,1)"
|
||
alt="页面设置" style="cursor: pointer" />
|
||
<img src="../Images/PrintSetup.gif" runat="server" id="btnPrint" onclick="document.all.WebBrowser.ExecWB(6,1)"
|
||
alt="打印设置" style="cursor: pointer" />
|
||
<img src="../Images/PrintPreview.gif" runat="server" id="Img1" onclick="printpr()"
|
||
alt="打印预览" style="cursor: pointer" />
|
||
<img src="../Images/Print.gif" runat="server" id="Img3" onclick="print()" alt="打印"
|
||
style="cursor: pointer" />
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<table id="Table5" runat="server" width="100%" border="0" cellpadding="0" cellspacing="0"
|
||
bordercolor="#000000">
|
||
<tr>
|
||
<td>
|
||
<table id="Table6" runat="server" width="100%" cellpadding="0" cellspacing="0" border="0"
|
||
bordercolor="#000000" bordercolordark="#000000" bordercolorlight="#000000">
|
||
<tr>
|
||
<td style="height:50px;width:25%"></td>
|
||
<td style="width:7%"></td>
|
||
<td style="width:18%"></td>
|
||
<td style="width:10%"></td>
|
||
<td style="width:15%"></td>
|
||
<td style="width:25%"></td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td style="height: 30px; vertical-align: middle;" align="center">
|
||
<asp:Image ImageUrl="~/Images/PrintLog.gif" ImageAlign="AbsMiddle" ID="image1" Width="40px" Height="40px" runat="server" />
|
||
</td>
|
||
<td colspan="3" style="font-size:15px">中国石油化工股份有限公司镇海炼化分公司</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="4" style="height:10px; background-color:blue;">
|
||
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td align="center" rowspan="4" style="font-size:24px">
|
||
焊接作业证
|
||
</td>
|
||
<td rowspan="4">
|
||
<asp:Image ImageAlign="AbsMiddle" ID="imgPhoto" Width="140px" Height="140px" runat="server" />
|
||
</td>
|
||
<td align="center" style="font-size:10px;">
|
||
姓 名
|
||
</td>
|
||
<td style="border-bottom: 1px solid #000000;">
|
||
<asp:Label ID="txtName" runat="server" Width="95%" Font-Size="10px"></asp:Label>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td style="font-size:10px;">
|
||
焊工代号
|
||
</td>
|
||
<td style="border-bottom: 1px solid #000000;">
|
||
<asp:Label ID="txtCode" runat="server" Width="95%" Font-Size="10px"></asp:Label>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td style="font-size:10px;">
|
||
证件编号
|
||
</td>
|
||
<td style="border-bottom: 1px solid #000000;">
|
||
<asp:Label ID="txtWorkCode" runat="server" Width="95%" Font-Size="10px"></asp:Label>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td style="font-size:10px;">
|
||
发证日期
|
||
</td>
|
||
<td style="border-bottom: 1px solid #000000;">
|
||
<asp:Label ID="txtDate" runat="server" Width="95%" Font-Size="10px"></asp:Label>
|
||
</td>
|
||
<td></td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="4" align="center">
|
||
<asp:Label runat="server" Height="30px" Width="100%" BackColor="Blue" Font-Size="18px" Text="镇 海 石 化 建 安 工 程 有 限 公 司" ForeColor="White"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr >
|
||
<td colspan="6" style="height:100px;"></td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000;">
|
||
合格项目代号
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;">
|
||
有效日期
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode1"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate1"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode2"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate2"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode3"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate3"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode4"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate4"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode5"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate5"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode6"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate6"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode7"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate7"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode8"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate8"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode9"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate9"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td></td>
|
||
<td colspan="3" align="center" style="height:23px; font-size:10px;border: 1px solid #000000; border-top:none;">
|
||
<asp:Label runat="server" ID="lbQualifyCode10"></asp:Label>
|
||
</td>
|
||
<td align="center" style="font-size:10px;border: 1px solid #000000; border-left:none;border-top:none;">
|
||
<asp:Label runat="server" ID="lbLimitDate10"></asp:Label>
|
||
</td>
|
||
<td>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
</table>
|
||
<object id="WebBrowser" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
|
||
</object>
|
||
</form>
|
||
</body>
|
||
</html>
|