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
{
///
/// 删除计划业务
///
public class DeleteAction : ChemicalWeighingAction, IAction
{
#region 事件定义
///
/// 删除计划事件定义
///
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.Debug("配方管理—删除配方业务...");
List 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.Error("{配方管理—删除配方}缺少配方管理控件...");
return;
}
this._clientGridControl = recipeTreeGridControl;
}
#endregion
}
}