using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CoreFS.CA06;
using Core.StlMes.Client.LgClassModel;
namespace Core.StlMes.Client.LgCommon
{
public partial class frmTest : FrmBase
{
public frmTest()
{
InitializeComponent();
}
private string _DEVICE_POSITION = "HMP01"; // 设备位置
private int _DEVICE_POS = 1; // 设备号
private CommandCollection CC = new CommandCollection();
private void frmTest_Load(object sender, EventArgs e)
{
ClsBusinessPack.getCommandCollection(_DEVICE_POSITION, CC, ob);
ucResAdditiveBase1.SetOpeBase(this.ob);
ucResAdditiveBase2.SetOpeBase(this.ob);
ucResAdditiveBase3.SetOpeBase(this.ob);
GetMaterialData();
SetHopperInfo();
SetManualAddtInfo();
ucResAdditiveBase1.SetAdditiveData(null);
ucResAdditiveBase2.SetAdditiveData(null);
ucResAdditiveBase3.SetAdditiveData(null);
//ucResPlan1.SetValuelistSteel(ob);
//ucResPlanCcm1.SetValuelistSteel(ob);
//ucResCcm1.GetValuelistProtectiveSlag(ob);
//ucHeatNoQuery1.SetSteelDropDownList(ob);
}
private void button1_Click(object sender, EventArgs e)
{
ClsBusinessPack.getCommandCollection(((Button)sender).Text.Substring(0, 3), CC, ob);
frmManualOperate frm = new frmManualOperate(((Button)sender).Text.Substring(0, 5), ((Button)sender).Text, CC);
frm.Location = ClsControlPack.GetChildWindowLocation(frm.Size);
frm.ShowDialog();
}
private DataTable _dtMaterial;
///
/// 获取物料信息
///
private void GetMaterialData()
{
bool bSuccess = false;
string strMsg = "";
DataSet ds = ClsDataAccessPack.GetMaterialData(out bSuccess, out strMsg, ob);
if (bSuccess) _dtMaterial = ds.Tables[0];
}
///
/// 初始化自动加料料仓配置
///
private void SetHopperInfo()
{
try
{
string strMsg = "";
bool bSuccess = false;
DataSet ds = ClsBusinessPack.GetHopperConfig("BOF01", out bSuccess, out strMsg, ob);
if (ds != null && ds.Tables.Count > 0)
{
ucResAdditiveBase1.SetHopperInfo(ds.Tables[0], this._dtMaterial);
ucResAdditiveBase2.SetHopperInfo(ds.Tables[0], this._dtMaterial);
}
}
catch { }
}
///
/// 初始化手投料配置
///
private void SetManualAddtInfo()
{
try
{
string strMsg = "";
bool bSuccess = false;
DataSet ds = ClsBusinessPack.GetManualAdditiveConfig("BOF01", out bSuccess, out strMsg, ob);
if (ds != null && ds.Tables.Count > 0)
{
ucResAdditiveBase3.SetHopperInfo(ds.Tables[0], this._dtMaterial);
}
}
catch { }
}
}
}