You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
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
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 干混机报表窗体初始化事件
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class InitFormAction : ChemicalWeighingAction, IAction
|
|
|
|
|
{
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
{
|
|
|
|
|
base.RunIni(runtime); //必须要调用的
|
|
|
|
|
ICSharpCode.Core.LoggingService<InitFormAction>.Debug("干混机报表-窗体初始化...");
|
|
|
|
|
|
|
|
|
|
#region 获取界面控件
|
|
|
|
|
|
|
|
|
|
DbMCControl clientGridControl = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Report_DryMixer").FirstOrDefault(); //获取本机台计划网格控件
|
|
|
|
|
|
|
|
|
|
if (clientGridControl == null)
|
|
|
|
|
{
|
|
|
|
|
ICSharpCode.Core.LoggingService<InitFormAction>.Error("{干混机报表-窗体加载} 缺少日志网格控件...");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
List<DbMCControl> 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(-3);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|