wbc
2025-11-13 4ed9b85875542aa93d573b03ef2bf41aae13328c
DevApp/Gs.DevApp/UserControl/UcBtnPrint.cs
@@ -1,4 +1,4 @@
using 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()