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.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Technical/PmtRecipe/DeleteAction.cs

65 lines
1.8 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data;
using ICSharpCode.Core;
using Mesnac.Controls.Base;
using Mesnac.Action.Base;
using Mesnac.Codd.Session;
using Mesnac.Action.ChemicalWeighing.Entity;
using Mesnac.Action.ChemicalWeighing.Technical.PmtRecipe.entity;
namespace Mesnac.Action.ChemicalWeighing.Technical.PmtRecipe
{
/// <summary>
/// 删除计划业务
/// </summary>
public class DeleteAction : ChemicalWeighingAction, IAction
{
#region 事件定义
/// <summary>
/// 删除计划事件定义
/// </summary>
public static event EventHandler OnDeleteRecipe;
#endregion
#region 字段定义
private RuntimeParameter _runtime;
private DbMCControl _clientGridControl = null;
#endregion
#region IAction接口实现
public void Run(RuntimeParameter runtime)
{
base.RunIni(runtime);
this._runtime = runtime;
ICSharpCode.Core.LoggingService<DeleteAction>.Debug("配方管理—删除配方业务...");
List<DbMCControl> recipeControlList = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "Base_RecipeInfo");
DbMCControl recipeTreeGridControl = recipeControlList.Where(x => x.BaseControl is TreeView).FirstOrDefault();
if (recipeTreeGridControl == null || !(recipeTreeGridControl.BaseControl is TreeView))
{
ICSharpCode.Core.LoggingService<RefreshAction>.Error("{配方管理—删除配方}缺少配方管理控件...");
return;
}
this._clientGridControl = recipeTreeGridControl;
}
#endregion
}
}