|
|
@ -1,6 +1,4 @@
|
|
|
|
using DevExpress.Utils.Drawing.Helpers;
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
using ICSharpCode.Core;
|
|
|
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.Entity.Report;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.Entity.Report;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.Report.ProductionReport;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.Report.ProductionReport;
|
|
|
|
using Microsoft.Office.Interop.Excel;
|
|
|
|
using Microsoft.Office.Interop.Excel;
|
|
|
@ -64,21 +62,9 @@ namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer
|
|
|
|
|
|
|
|
|
|
|
|
string fileName = sfd.FileName;
|
|
|
|
string fileName = sfd.FileName;
|
|
|
|
if (!String.IsNullOrEmpty(fileName))
|
|
|
|
if (!String.IsNullOrEmpty(fileName))
|
|
|
|
{
|
|
|
|
|
|
|
|
try
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
//写入Excle
|
|
|
|
//写入Excle
|
|
|
|
DataTabletoExcel(fileName, dt, dryMixerDos);
|
|
|
|
DataTabletoExcel(fileName, dt, dryMixerDos);
|
|
|
|
string msg1 = "干混机报表导出成功"; //导出生产报表数据至Excel成功!
|
|
|
|
|
|
|
|
ICSharpCode.Core.LoggingService<ExportAction>.Info(msg1);
|
|
|
|
|
|
|
|
MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.Caption, MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
catch (Exception ex)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
string msg1 = $"干混机报表导出异常:{ex.Message}";
|
|
|
|
|
|
|
|
ICSharpCode.Core.LoggingService<ExportAction>.Error(msg1);
|
|
|
|
|
|
|
|
MessageBox.Show(msg1, Mesnac.Basic.LanguageHelper.WarnCaption, MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|