|
|
@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Linq;
|
|
|
|
|
|
|
|
using System.Windows.Forms;
|
|
|
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
public class RestartAction:ChemicalWeighingAction, IAction
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
private DbMCControl _materialGridControl = null; //物料列表控件
|
|
|
|
|
|
|
|
private RuntimeParameter _runtime;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static event EventHandler OnRestart;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
base.RunIni(runtime); //必须调用
|
|
|
|
|
|
|
|
this._runtime = runtime;
|
|
|
|
|
|
|
|
DbMCControl materialGridControl =
|
|
|
|
|
|
|
|
this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "lj_planning")
|
|
|
|
|
|
|
|
.FirstOrDefault(); //获取物料数据控件
|
|
|
|
|
|
|
|
this._materialGridControl = materialGridControl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DataGridView clientGridView = this._materialGridControl.BaseControl as DataGridView;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//验证是否选中某物料
|
|
|
|
|
|
|
|
if (clientGridView.SelectedRows.Count != 1)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MessageBox.Show("请选择要修改的数据", Mesnac.Basic.LanguageHelper.Caption,
|
|
|
|
|
|
|
|
MessageBoxButtons.OK, MessageBoxIcon.Information);
|
|
|
|
|
|
|
|
this._runtime.IsReturn = true;
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var dataGridViewRow = clientGridView.SelectedRows[0];
|
|
|
|
|
|
|
|
var id = Convert.ToInt32(dataGridViewRow.Cells["Id"].Value);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|