From e369e85122e0e48eb79b4f53e18bef64d5407539 Mon Sep 17 00:00:00 2001 From: wangsr Date: Wed, 9 Aug 2023 15:55:25 +0800 Subject: [PATCH] =?UTF-8?q?add=20-=20=E5=B9=B2=E6=B7=B7=E6=9C=BA=E6=8A=A5?= =?UTF-8?q?=E8=A1=A8=E4=BA=8B=E4=BB=B6=EF=BC=9A=E5=88=9D=E5=A7=8B=E5=8C=96?= =?UTF-8?q?=E3=80=81=E6=9F=A5=E8=AF=A2=E3=80=81=E6=98=8E=E7=BB=86=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E3=80=81=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Report/DryMixer/ExportAction.cs | 12 ++++++ .../Report/DryMixer/InitFormAction.cs | 38 +++++++++++++++++++ .../Report/DryMixer/SelectAction.cs | 12 ++++++ .../榄菊报表.干混机报表.xml | 1 + Main/MCEdit/MCEdit.csproj | 8 ++++ 5 files changed, 71 insertions(+) create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/InitFormAction.cs create mode 100644 Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs create mode 100644 Main/MCEdit/Data/EventConfig/小料称量/榄菊报表.干混机报表.xml diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs new file mode 100644 index 0000000..49304c3 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/ExportAction.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer +{ + internal class ExportAction + { + } +} diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/InitFormAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/InitFormAction.cs new file mode 100644 index 0000000..b74cf47 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/InitFormAction.cs @@ -0,0 +1,38 @@ +using Mesnac.Action.Base; +using Mesnac.Controls.Base; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer +{ + /// + /// 干混机报表窗体初始化事件 + /// + public class InitFormAction : ChemicalWeighingAction, IAction + { + public void Run(RuntimeParameter runtime) + { + base.RunIni(runtime); //必须要调用的 + ICSharpCode.Core.LoggingService.Debug("干混机报表-窗体初始化..."); + + #region 获取界面控件 + + DbMCControl clientGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Report_DryMixer").FirstOrDefault(); //获取本机台计划网格控件 + + if (clientGridControl == null) + { + ICSharpCode.Core.LoggingService.Error("{干混机报表-窗体加载} 缺少日志网格控件..."); + return; + } + + #endregion + + List mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件 + IBaseControl startdate = mcControllist.Where(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey.ToLower() == "startdate").FirstOrDefault().BaseControl; + startdate.MCValue = DateTime.Now.AddDays(-1); + } + } +} diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs new file mode 100644 index 0000000..d085164 --- /dev/null +++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/DryMixer/SelectAction.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Mesnac.Action.ChemicalWeighing.Report.DryMixer +{ + internal class SelectAction + { + } +} diff --git a/Main/MCEdit/Data/EventConfig/小料称量/榄菊报表.干混机报表.xml b/Main/MCEdit/Data/EventConfig/小料称量/榄菊报表.干混机报表.xml new file mode 100644 index 0000000..1448b46 --- /dev/null +++ b/Main/MCEdit/Data/EventConfig/小料称量/榄菊报表.干混机报表.xml @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Main/MCEdit/MCEdit.csproj b/Main/MCEdit/MCEdit.csproj index e676a90..3ad1e21 100644 --- a/Main/MCEdit/MCEdit.csproj +++ b/Main/MCEdit/MCEdit.csproj @@ -154,6 +154,10 @@ + + {90cc2d8a-dec5-4d2a-82c9-f7a033060dc1} + Mesnac.Action.ChemicalWeighing + {18BCAA9F-D601-43B6-B443-E6B126ADF540} Mesnac.Controls.Base @@ -215,6 +219,10 @@ Designer PreserveNewest + + Designer + PreserveNewest + Designer PreserveNewest