45 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
			
		
		
	
	
			45 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			C#
		
	
	
	
| using System;
 | |
| using System.Linq;
 | |
| using System.Web.UI;
 | |
| using BLL;
 | |
| 
 | |
| namespace FineUIPro.Web.RLSB
 | |
| {
 | |
|     public partial class WelderRecordPrint : PageBase
 | |
|     {
 | |
|         /// <summary>
 | |
|         /// 加载页面
 | |
|         /// </summary>
 | |
|         /// <param name="sender"></param>
 | |
|         /// <param name="e"></param>
 | |
|         protected void Page_Load(object sender, EventArgs e)
 | |
|         {
 | |
|             if (!IsPostBack)
 | |
|             {
 | |
|                 string electrodeRecoveryId = Request.Params["electrodeRecoveryId"];
 | |
|                 string fileName = Request.Params["fileName"];
 | |
|                 string identityCard = Request.Params["identityCard"];
 | |
|                 var welder = BLL.WelderService.GetWelderByIdentityCard(identityCard);
 | |
|                 if (welder != null)
 | |
|                 {
 | |
|                     //Page.ClientScript.RegisterStartupScript(this.GetType(), "tips", "print()", true);//自动打印
 | |
|                     //this.ClientScript.RegisterStartupScript(this.GetType(), "tips", "DoPrint()", true);
 | |
|                     ClientScript.RegisterStartupScript(ClientScript.GetType(), "", "<script type='text/javascript'>window.print();setTimeout(function () {   window.close();          }, 5000);;</script>");
 | |
|                 }
 | |
|             }
 | |
|         }
 | |
| 
 | |
|         //protected void imgBtnReLoad_Click(object sender, ImageClickEventArgs e)
 | |
|         //{
 | |
|         //    Timer1.Interval = 2000;
 | |
| 
 | |
|         //    //Thread.Sleep(1000);
 | |
|         //    //ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "window.close()", true);
 | |
|         //}
 | |
| 
 | |
|         //protected void Timer1_Tick(object sender, EventArgs e)
 | |
|         //{
 | |
|         //    ScriptManager.RegisterStartupScript(this, typeof(string), "_alert", "window.close()", true);
 | |
|         //}
 | |
|     }
 | |
| } |