From 68ef3b8f49cd693c2fda8296fff5657134d6450a Mon Sep 17 00:00:00 2001 From: wangsr Date: Wed, 9 Aug 2023 17:12:00 +0800 Subject: [PATCH] =?UTF-8?q?change=20-=20=E5=B9=B2=E6=B7=B7=E6=9C=BA?= =?UTF-8?q?=E6=8A=A5=E8=A1=A8=E5=AF=BC=E5=87=BA=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Report/DryMixer/ExportAction.cs | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs index 73ab58b..f1b126e 100644 --- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs @@ -1,4 +1,6 @@ -using Mesnac.Action.Base; +using DevExpress.Utils.Drawing.Helpers; +using ICSharpCode.Core; +using Mesnac.Action.Base; using Mesnac.Action.ChemicalWeighing.Entity.Report; using Mesnac.Action.ChemicalWeighing.Report.ProductionReport; using Microsoft.Office.Interop.Excel; @@ -63,8 +65,20 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer string fileName = sfd.FileName; if (!String.IsNullOrEmpty(fileName)) { - //写入Excle - DataTabletoExcel(fileName, dt, dryMixerDos); + try + { + //写入Excle + DataTabletoExcel(fileName, dt, dryMixerDos); + string msg1 = "干混机报表导出成功"; //导出生产报表数据至Excel成功! + ICSharpCode.Core.LoggingService.Info(msg1); + MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information); + } + catch (Exception ex) + { + string msg1 = $"干混机报表导出异常:{ex.Message}"; + ICSharpCode.Core.LoggingService.Error(msg1); + MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.WarnCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning); + } } } }