From 03302e55e6a3c830ea310b1ec63e0e2e48985e2e Mon Sep 17 00:00:00 2001
From: wbc <2597324127@qq.com>
Date: 星期四, 13 十一月 2025 17:34:51 +0800
Subject: [PATCH] 更新
---
DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs b/DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs
index 2f42c04..70272fb 100644
--- a/DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs
+++ b/DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs
@@ -1,4 +1,4 @@
-锘縰sing Gs.DevApp.DevFrm.Rpt;
+using Gs.DevApp.DevFrm.Rpt;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
@@ -152,6 +152,38 @@
}
/// <summary>
+ /// 璁剧疆鈥滅‘瀹氭墦鍗扳�濇寜閽殑鏄剧ず鏂囨湰
+ /// </summary>
+ /// <param name="text">鎸夐挳鏂囨湰</param>
+ public void SetPrintText(string text)
+ {
+ if (string.IsNullOrWhiteSpace(text)) return;
+ this.btnPrint.Text = text;
+ }
+
+ /// <summary>
+ /// 澶栭儴瑙﹀彂鎵撳嵃娴佺▼锛氭墽琛� btnPrintClick 閫昏緫骞舵墦鍗�
+ /// </summary>
+ public void TriggerPrint()
+ {
+ // 澶嶇敤鐜版湁鐐瑰嚮鎸夐挳閫昏緫
+ if (btnPrintClick != null)
+ btnPrintClick(this, EventArgs.Empty);
+ else
+ return;
+
+ if (rptParameter == "return false")
+ return;
+ if (string.IsNullOrEmpty(rptParameter))
+ {
+ MsgHelper.ShowError("娌℃湁鎸囧畾鎶ヨ〃鍙傛暟锛岃鑱旂郴鎶�鏈紑鍙戜汉鍛橈紒");
+ return;
+ }
+
+ _print();
+ }
+
+ /// <summary>
///
/// </summary>
private void _print()
--
Gitblit v1.9.3