|
|
@ -1,15 +1,19 @@
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Data;
|
|
|
|
using System.Data;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Linq;
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjMaterial;
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjMaterial;
|
|
|
|
|
|
|
|
using Mesnac.Controls.Base;
|
|
|
|
|
|
|
|
using Mesnac.Controls.Default;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
{
|
|
|
|
{
|
|
|
|
public class InItDbAction:ChemicalWeighingAction, IAction
|
|
|
|
public class InItDbAction:ChemicalWeighingAction, IAction
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private DbMCControl _materialGridControl = null; //物料列表控件
|
|
|
|
private DbMCControl _materialGridControl = null; //物料列表控件
|
|
|
|
private RuntimeParameter _runtime;
|
|
|
|
private RuntimeParameter _runtime;
|
|
|
|
|
|
|
|
private MCCombobox PlanStatus;
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
public void Run(RuntimeParameter runtime)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
base.RunIni(runtime); //必须调用
|
|
|
|
base.RunIni(runtime); //必须调用
|
|
|
@ -30,6 +34,15 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "lj_planning")
|
|
|
|
this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "lj_planning")
|
|
|
|
.FirstOrDefault(); //获取物料数据控件
|
|
|
|
.FirstOrDefault(); //获取物料数据控件
|
|
|
|
this._materialGridControl = materialGridControl;
|
|
|
|
this._materialGridControl = materialGridControl;
|
|
|
|
|
|
|
|
List<DbMCControl> mcControllist = GetAllDbMCControlsByOption(DbOptionTypes.Query);//获取所有待初始化控件
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PlanStatus = mcControllist.FirstOrDefault(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey == "PlanStatus").BaseControl as MCCombobox;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String sql = @"select statusid as CmbValue ,statusname as CmbDisplay from lj_planning_status";
|
|
|
|
|
|
|
|
DataTable dataTable = DBHelp.GetTable(sql);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PlanStatus.DataSource = dataTable;
|
|
|
|
FileControl();
|
|
|
|
FileControl();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -37,7 +50,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DataTable table =
|
|
|
|
DataTable table =
|
|
|
|
DBHelp.GetTable(@"select Id,PlanName, PlanNo, Status, CreateTime, UpdateTime, BegTime, EndTime, NumCar, Unit, Remark, IsEnable, FormulaId, FormulaName,'' as StatusName
|
|
|
|
DBHelp.GetTable(@"select Id,PlanName, PlanNo, Status, CreateTime, UpdateTime, BegTime, EndTime, NumCar, Unit, Remark, IsEnable, FormulaId, FormulaName,'' as StatusName
|
|
|
|
,ClassName from lj_planning where IsEnable=1 order by CreateTime desc ");
|
|
|
|
,ClassName from lj_planning where IsEnable=1 order by CreateTime desc ");
|
|
|
|
|
|
|
|
|
|
|
|
if (this._materialGridControl != null && this._materialGridControl.BaseControl != null)
|
|
|
|
if (this._materialGridControl != null && this._materialGridControl.BaseControl != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|