| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- 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;
- /// <summary>
- /// 获取物料信息
- /// </summary>
- private void GetMaterialData()
- {
- bool bSuccess = false;
- string strMsg = "";
- DataSet ds = ClsDataAccessPack.GetMaterialData(out bSuccess, out strMsg, ob);
- if (bSuccess) _dtMaterial = ds.Tables[0];
- }
- /// <summary>
- /// 初始化自动加料料仓配置
- /// </summary>
- 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 { }
- }
- /// <summary>
- /// 初始化手投料配置
- /// </summary>
- 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 { }
- }
- }
- }
|