using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Core.LgMes.Client.LgResMgt;
using System.Threading;
using Core.LgMes.Client.lgClassModel;
using System.Collections;
using System.Reflection;
using CoreFS.CA06;
namespace Core.LgMes.Client.lgJobMgt
{
public partial class frmMixmIron : CoreFS.CA06.FrmBase
{
private Thread _getDataThread; // 取数据线程
private bool _bIfGetData = true; // 控制取数据线程循环的标志
private string[] ArrayIronRow = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存铁运进铁数据
private string[] ArrayIronRow2 = new string[20] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存混铁炉进铁数据
private string[] ArrayIronRow3 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存混铁炉出铁数据
private string[] ArrayIronRow4 = new string[25] { "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" }; //保存发送到转炉铁水数据
private string _strSendSucceededForBof1 = "";
private string _strSendSucceededForBof2 = "";
private string _strSendSucceededForBof3 = "";
private string _strSendSucceededForHmp1 = "";
private string _strSendSucceededForHmp2 = "";
private string _strHmp1No = "";
private string _strHmp2No = "";
private bool blModify = false;
#region formload
public frmMixmIron()
{
InitializeComponent();
CheckForIllegalCrossThreadCalls = false;
}
private void frmMixmIron_Load(object sender, EventArgs e)
{
try
{
User = this.UserInfo.GetUserName();//操作人;
lblTyjt.Text = "T" + this.Text.Substring(0, 1);
lblHtjt.Text = "J" + this.Text.Substring(0, 1);
lblHtct.Text = "C" + this.Text.Substring(0, 1);
SetUserControlDelegate();
ultraDataSource1.Rows.Add(new object[] { "", "", "", "", "", "", "", "", null });
timer1_Tick(null, new EventArgs());
this.timer1.Start();
GetInIronData();
StartUpThread();
setbutton("1");
setucInIron("1");
SetColumnModeShift(ucInIron1.ultraGrid1);
SetColumnModeGroup(ucInIron1.ultraGrid1);
SetColumnModequxiang();
setucHtInIron("1");
setbutton2("1");
SetColumnModeShift(ucHtInIron1.ultraGrid1);
SetColumnModeGroup(ucHtInIron1.ultraGrid1);
GetHtInIronData();
ultHtInIronGrid_AfterRowActivate(null, null);
setucHtInIron3("1");
setbutton3("1");
SetColumnModeShift(ucHtOutIron1.ultraGrid1);
SetColumnModeGroup(ucHtOutIron1.ultraGrid1);
SetColumnModeOutquxiang();
GetHtOutIronData();
ucInIron1.ultraGrid1.Rows[0].Cells["FOLDPOTWGT"].Hidden = true;
GetElementData();
}
catch
{ }
}
#endregion
#region Thread Handle
///
/// 启动线程主程序
///
private void StartUpThread()
{
ThreadStart ts = new ThreadStart(GetDataThread);
_getDataThread = new Thread(ts);
_getDataThread.Name = "GetDataThread ";
_getDataThread.Start();
}
private string User ="";
///
/// 取数据线程程序
///
private void GetDataThread()
{
while (_bIfGetData)
{
if (!this.On_Off_Thread)//this.On_Off_Thread
{
System.Threading.Thread.Sleep(5000);
continue;
}
try
{
//GetInIronData();
GetRealData();
GetCVTHeatno();
Thread.Sleep(10000);
}
catch { }
}
}
#endregion
#region dataevent
private void GetRealData()
{
if (this.Text == "") return;
string Wsid = this.Text.Substring(0, 1);
string strwhere = "where wsid ='" + Wsid + "'";
string err = "";
try
{
//hengxing
//CallingMessage par = new CallingMessage();
//par.ServerName = "lgJobMgt";
//par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
//par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
//par.MethodName = "GetRealData";
//par.args = new object[] { strwhere };
DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
ultraDataSource1.Rows.Clear();
if (ds.Tables.Count > 0)
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
ultraDataSource1.Rows.Add(new object[] {
dr["IRONWGT"].ToString(),
dr["GASSTRESS"].ToString(),
dr["IMPORTIRONTOTAL"].ToString(),
dr["EXPORTIRONTOTAL"].ToString(),
dr["SKIPIRONTOTAL"].ToString(),
dr["IRONTEMPERATURE"].ToString(),
dr["GASFLUX"].ToString(),
dr["GASCONSUME"].ToString(),
dr["UPDATETIME"].ToString()
});
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
///
/// 混铁炉进铁数据 utrHtInIronGrid
///
///
private void GetHtInIronData()
{
string err = "";
string htWhere = "";
string Wsid = this.Text.Substring(0, 1);
htWhere = " where to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') and WSID='" + Wsid + "'";
try
{
//hengxing
//CallingMessage par = new CallingMessage();
//par.ServerName = "lgJobMgt";
//par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
//par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
//par.MethodName = "SelectHtInIronData";
//par.args = new object[] { htWhere };
//object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
ultraDataSource3.Rows.Clear();
if (ds.Tables.Count > 0)
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
ultraDataSource3.Rows.Add(new object[] {
dr["MISID"].ToString(),
dr["MOLIRNSOURCE"].ToString(),
dr["STOVEID"].ToString(),
dr["TFPOTID"].ToString(),
dr["TFPOTGROSSWGT"].ToString(),
dr["TFPOTTAREWGT"].ToString(),
dr["TFPOTWGT"].ToString(),
dr["C"].ToString(),
dr["SI"].ToString(),
dr["MN"].ToString(),
dr["P"].ToString(),
dr["S"].ToString(),
dr["ASN"].ToString(),
dr["IRONTEMPERATURE"].ToString(),
dr["ARRIVETIME"].ToString(),
ConvertShift("1",dr["SHIFTCODE"].ToString()),
ConvertShift("2",dr["SHIFTCODE"].ToString()),
dr["Memo"].ToString()
});
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
///
/// 铁运进铁数据 ultraGrid2
///
private void GetInIronData()
{
string err = "";
string htWhere = "";
htWhere = " where to_char(ARRIVETIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS')";
try
{
//hengxing
//CallingMessage par = new CallingMessage();
//par.ServerName = "lgJobMgt";
//par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
//par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
//par.MethodName = "SelectInIronData";
//par.args = new object[] { htWhere };
//object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
ultraDataSource2.Rows.Clear();
if (ds.Tables.Count > 0)
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
ultraDataSource2.Rows.Add(new object[] {
dr["MISID"].ToString(),
dr["MOLIRNSOURCE"].ToString(),
dr["STOVEID"].ToString(),
dr["TFPOTID"].ToString(),
dr["TFPOTGROSSWGT"].ToString(),
dr["TFPOTTAREWGT"].ToString(),
dr["TFPOTWGT"].ToString(),
dr["C"].ToString(),
dr["SI"].ToString(),
dr["MN"].ToString(),
dr["P"].ToString(),
dr["S"].ToString(),
dr["ASN"].ToString(),
dr["IRONTEMPERATURE"].ToString(),
dr["ARRIVETIME"].ToString(),
ConvertShift("1",dr["SHIFTCODE"].ToString()),
ConvertShift("2",dr["SHIFTCODE"].ToString())
});
}
}
}
catch
{ }
}
///
/// 获取出铁详细列表
///
private void GetHtOutIronData()
{
string err = "";
string htWhere = "";
string Wsid = this.Text.Substring(0, 1);
htWhere = " where to_char(TAPHOLESTARTTIME,'YYYYMMDDHH24MISS') BETWEEN to_char((sysdate-1/3),'YYYYMMDDHH24MISS') and to_char(sysdate,'YYYYMMDDHH24MISS') and WSID='" + Wsid + "'";
try
{
//hengxing
//CallingMessage par = new CallingMessage();
//par.ServerName = "lgJobMgt";
//par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
//par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
//par.MethodName = "SelectHtOutIronData";
//par.args = new object[] { htWhere };
//object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
ultraDataSource4.Rows.Clear();
if (ds.Tables.Count > 0)
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
ultraDataSource4.Rows.Add(new object[] {
dr["MISID"].ToString(),
dr["MOLIRNLEAVE"].ToString(),
dr["IRONWRAPID"].ToString(),
dr["IRONPOTTAREWGT"].ToString(),
dr["IRONPOTGROSSWGT"].ToString(),
dr["IRONPOTWGT"].ToString(),
dr["C"].ToString(),
dr["SI"].ToString(),
dr["MN"].ToString(),
dr["P"].ToString(),
dr["S"].ToString(),
dr["ASN"].ToString(),
dr["IRONTEMPERATURE"].ToString(),
dr["TAPHOLESTARTTIME"].ToString(),
ConvertShift("1",dr["SHIFTCODE"].ToString()),
ConvertShift("2",dr["SHIFTCODE"].ToString()),
dr["IRONEXPORTTYPE"].ToString(),
dr["SMELTINGIDOFCVT"].ToString(),
dr["WEIGHTOFCVT"].ToString(),
dr["IRONWRAPAGE"].ToString(),
dr["CHECKNO"].ToString()
});
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
private void GetElementData()
{
string err = "";
string htWhere = "";
string Wsid = this.Text.Substring(0, 1);
htWhere = " where STATIONCODE='M0" + Wsid + "'";
try
{
//hengxing
//CallingMessage par = new CallingMessage();
//par.ServerName = "lgJobMgt";
//par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
//par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
//par.MethodName = "SelectHtElementData";
//par.args = new object[] { htWhere };
//object obj = ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
DataSet ds = null;// (DataSet)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
ultraDataSource5.Rows.Clear();
if (ds.Tables.Count > 0)
{
foreach (DataRow dr in ds.Tables[0].Rows)
{
ultraDataSource5.Rows.Add(new object[] {
dr["STATIONCODE"].ToString(),
dr["C"].ToString(),
dr["SI"].ToString(),
dr["MN"].ToString(),
dr["P"].ToString(),
dr["S"].ToString(),
dr["ASN"].ToString(),
dr["NI"].ToString(),
dr["CU"].ToString(),
dr["SN"].ToString(),
dr["SB"].ToString(),
dr["CHECKNO"].ToString()
});
}
}
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
}
private void RefreshHighheatNo()
{
string sqlstr = "";
int nFurnaceNo = 0;
try
{
if (this.rdoFNo1.Checked) nFurnaceNo = 1;
if (this.rdoFNo2.Checked) nFurnaceNo = 2;
if (this.rdoFNo3.Checked) nFurnaceNo = 3;
if (this.rdoFNo4.Checked) nFurnaceNo = 4;
if (this.rdoFNo5.Checked) nFurnaceNo = 5;
if (this.rdoFNo6.Checked) nFurnaceNo = 6;
if (this.rdoFNo7.Checked) nFurnaceNo = 7;
if (this.rdoFNo8.Checked) nFurnaceNo = 8;
if (this.rdoFNo9.Checked) nFurnaceNo = 9;
if (this.radioButton1.Checked) nFurnaceNo = 0;
if (nFurnaceNo > 0)
{
sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
+ " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
+ " from ( select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
+ " from job_chemelement "
+ " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
+ " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
+ " to_char(sysdate, 'YYYYMMDDHH24MISS') "
+ " and Assaytypecode like '%%A%%' and substr(checkno,1,1)='" + nFurnaceNo + "'"
+ " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
+ " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
}
else
{
sqlstr = @" select t.*,t1.tfpotid,t1.tfpottarewgt,t1.tfpotgrosswgt,t1.tfpotwgt,"
+ " to_char(t1.hstapholetime, 'dd HH24:mi') hstapholetime "
+ " from (select substr(CHECKNO,1,INSTR(CHECKNO,'_')-1) SMELTINGID, nvl(c,0) c, si, mn, p, s, asn, ASSAYDATE,heatno "
+ " from job_chemelement "
+ " where to_char(ASSAYDATE, 'YYYYMMDDHH24MISS') BETWEEN "
+ " to_char((sysdate - 1 / 3), 'YYYYMMDDHH24MISS') and "
+ " to_char(sysdate, 'YYYYMMDDHH24MISS') "
+ " and Assaytypecode like '%%A%%' "
+ " order by ASSAYDATE desc ) t left join res_if_blastfurnaceiron t1 on t.heatno = t1.stoveid || '-' || "
+ " decode(t1.stoveid, '2', 'd', '') || t1.stovetime";
}
string htOut = "", htWhere = "";
//hengxing
//CallingMessage par = new CallingMessage();
//par.ServerName = "lgJobMgt";
//par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
//par.ClassName = "Core.LgMes.Server.lgJobMgt.classIronJob";
//par.MethodName = "GetHighHeatNo";
//par.args = new object[] { sqlstr, htWhere };
object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod(par, out htOut);
if (htOut == "" && obj != null)
{
DataTable furnaceDs = ((DataSet)obj).Tables[0];
ultraGrid1.DataSource = furnaceDs;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Caption = "高炉号/批次";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].Width = 60;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Header.Caption = "C";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[1].Width = 50;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Header.Caption = "Si";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[2].Width = 50;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Header.Caption = "Mn";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[3].Width = 50;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Header.Caption = "P";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[4].Width = 50;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Header.Caption = "S";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[5].Width = 50;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Header.Caption = "As";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[6].Width = 50;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Header.Caption = "化验时间";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Width = 60;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[7].Format = "dd HH:mm";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[8].Hidden = true;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Header.Caption = "铁罐号";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[9].Width = 60;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Header.Caption = "铁水总重";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[10].Width = 60;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Header.Caption = "铁罐皮重";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[11].Width = 60;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Header.Caption = "铁水净重";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[12].Width = 60;
this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Header.Caption = "出铁时间";
this.ultraGrid1.DisplayLayout.Bands[0].Columns[13].Width = 60;
}
}
catch { return; }
}
private void SaveIronData()
{
GetGridData();
string strError = "";
//Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpTest", new object[] { ArrayIronRow }, out strError);
// Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateIronData", new object[] { ArrayIronRow }, out strError);
if (strError == "")
MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
private void InsertData()
{
GetGridData();
if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动")
{
string strError = "";
string[] strGLGH = ArrayIronRow[5].Split(',');
bool blErr = false;
for (int i = 0; i < strGLGH.Length; i++)
{
ArrayIronRow[5] = strGLGH[i];
// Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertIronData", new object[] { ArrayIronRow }, out strError);
if (strError == "") blErr = true;
}
if (blErr == false)
MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
string strError = "";
//Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateIronData", new object[] { ArrayIronRow }, out strError);
if (strError == "")
{
//MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
private void InsertData2()
{
GetGridData2();
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动")
{
string strError = "";
//Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertHtIronData", new object[] { ArrayIronRow2 }, out strError);
if (strError != "")
MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
string strError = "";
// Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateHtInIronData", new object[] { ArrayIronRow2 }, out strError);
if (strError != "")
MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
///
/// 插入出铁记录
///
///
///
private void InsertData3()
{
GetGridData3();
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动")
{
string strError = "";
//Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "InsertHtOutIronData", new object[] { ArrayIronRow3 }, out strError);
if (strError == "")
{
//MessageBox.Show("插入记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
}
else
MessageBox.Show("插入记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
else
{
string strError = "";
//Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "UpdateHtOutIronData", new object[] { ArrayIronRow3 }, out strError);
if (strError == "")
{
//MessageBox.Show("修改记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
}
else
MessageBox.Show("修改记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
///
/// 获取冶炼炉号
///
///
///
///
private void GetCVTHeatno()
{
try
{
this.txtCVT1.Text = "";
this.txtCVT1.Appearance.BackColor = Color.LightGray;
this.txtCVT2.Text = "";
this.txtCVT2.Appearance.BackColor = Color.LightGray;
this.txtCVT3.Text = "";
this.txtCVT3.Appearance.BackColor = Color.LightGray;
this.txtHMP1.Text = "";
this.txtHMP1.Appearance.BackColor = Color.LightGray;
this.txtHMP2.Text = "";
this.txtHMP2.Appearance.BackColor = Color.LightGray;
string strError = "";
DataSet ds = null;// (DataSet)Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "getCVTHMPCurrentLH", new object[] { }, out strError);
if (strError == "")
{
if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
{
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
string v_LH = "";
string v_POS = ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1);
string v_POSID = ds.Tables[0].Rows[i]["objectpos"].ToString().Substring(3, 2);
// if (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(0, 1) == "V") v_LH = "V" + v_LH;
if (v_POS == "C")
{
v_LH = (ds.Tables[0].Rows[i]["objectid"].ToString().Substring(5, 8));
if (v_POSID == "01")
{
if (_strSendSucceededForBof1 == "" || _strSendSucceededForBof1 == "N") HeatNo_HudwId_Exist(v_LH);
if (_strSendSucceededForBof1 == "Y") txtCVT1.Appearance.BackColor = Color.LightBlue;
this.txtCVT1.Text = v_LH;
}
if (v_POSID == "02")
{
if (_strSendSucceededForBof2 == "" || _strSendSucceededForBof2 == "N") HeatNo_HudwId_Exist(v_LH);
if (_strSendSucceededForBof2 == "Y") txtCVT2.Appearance.BackColor = Color.LightBlue;
this.txtCVT2.Text = v_LH;
}
if (v_POSID == "03")
{
if (_strSendSucceededForBof3 == "" || _strSendSucceededForBof3 == "N") HeatNo_HudwId_Exist(v_LH);
if (_strSendSucceededForBof3 == "Y") txtCVT3.Appearance.BackColor = Color.LightBlue;
this.txtCVT3.Text = v_LH;
}
}
if (v_POS == "H")
{
v_LH = ds.Tables[0].Rows[i]["objectid"].ToString();
if (v_POSID == "01")
{
_strHmp1No = ds.Tables[0].Rows[i]["objectid"].ToString();
if (_strSendSucceededForHmp1 == "" || _strSendSucceededForHmp1 == "N") HeatNo_HudwId_Exist(v_LH);
if (_strSendSucceededForHmp1 == "Y") txtHMP1.Appearance.BackColor = Color.LightBlue;
this.txtHMP1.Text = v_LH;
}
if (v_POSID == "02")
{
if (_strSendSucceededForHmp2 == "" || _strSendSucceededForHmp2 == "N") HeatNo_HudwId_Exist(v_LH);
_strHmp2No = ds.Tables[0].Rows[i]["objectid"].ToString();
if (_strSendSucceededForHmp2 == "Y") txtHMP2.Appearance.BackColor = Color.LightBlue;
this.txtHMP2.Text = v_LH;
}
}
}
}
if (txtCVT1.Text.Trim().Length == 0) _strSendSucceededForBof1 = "N";
if (txtCVT2.Text.Trim().Length == 0) _strSendSucceededForBof2 = "N";
if (txtCVT3.Text.Trim().Length == 0) _strSendSucceededForBof3 = "N";
if (txtHMP1.Text.Trim().Length == 0) _strSendSucceededForHmp1 = "N";
if (txtHMP2.Text.Trim().Length == 0) _strSendSucceededForHmp2 = "N";
}
}
catch (Exception EE)
{
}
}
private void SendIronToCvt()
{
string strError = "";
string strWz = "";
//Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "SendIronToCVT", new object[] { ArrayIronRow4 }, out strError);
if (strError == "")
{
if (ArrayIronRow4[4].Substring(0, 1) == "H")
strWz = ArrayIronRow4[4].Substring(0, 2);
else
strWz = ArrayIronRow4[4].Substring(2, 1);
switch (strWz)
{
case "H1":
_strSendSucceededForHmp1 = "Y";
break;
case "H2":
_strSendSucceededForHmp2 = "Y";
break;
case "1":
_strSendSucceededForBof1 = "Y";
break;
case "2":
_strSendSucceededForBof2 = "Y";
break;
case "3":
_strSendSucceededForBof3 = "Y";
break;
default:
break;
}
MessageBox.Show("成功发送铁水!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
else
MessageBox.Show("发送失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
#endregion
#region gridevent
private void ultraGrid1_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
{
if (blModify == false)
{
setbutton("2");
setucInIron("2");
string shiftgroup = getshift();
Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
try
{
SetMisnoNoEdite();
ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", shiftgroup);
ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", shiftgroup);
ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0,1);
ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
}
catch
{ }
}
else
{
ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = e.Row.Cells["SMELTINGID"].Text.Substring(0, 1);
ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = e.Row.Cells["C"].Value != System.DBNull.Value ? e.Row.Cells["C"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = e.Row.Cells["SI"].Value != System.DBNull.Value ? e.Row.Cells["SI"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = e.Row.Cells["MN"].Value != System.DBNull.Value ? e.Row.Cells["MN"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = e.Row.Cells["P"].Value != System.DBNull.Value ? e.Row.Cells["P"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = e.Row.Cells["S"].Value != System.DBNull.Value ? e.Row.Cells["S"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = e.Row.Cells["ASN"].Value != System.DBNull.Value ? e.Row.Cells["ASN"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = e.Row.Cells["TFPOTID"].Value != System.DBNull.Value ? e.Row.Cells["TFPOTID"].Text : "";
ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = e.Row.Cells["tfpottarewgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpottarewgt"].Text : "";
ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = e.Row.Cells["tfpotgrosswgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotgrosswgt"].Text : "";
ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = e.Row.Cells["tfpotwgt"].Value != System.DBNull.Value ? e.Row.Cells["tfpotwgt"].Text : "";
}
}
///
/// 取相关数据到编辑区 铁运进铁数据
///
///
///
private void ultraGrid2_AfterRowActivate(object sender, EventArgs e)
{
Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultraGrid2.ActiveRow;
if (aRow == null) return;
if (ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
try
{
ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = aRow.Cells["InIronNo"].Text;
ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = aRow.Cells["HighNo"].Text;
ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = aRow.Cells["InTime"].Text;
ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
}
catch { }
}
private void ultHtInIronGrid_AfterRowActivate(object sender, EventArgs e)
{
}
private void ultHtOutIronGrid_AfterRowActivate(object sender, EventArgs e)
{
//Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
//// Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
//if (aRow == null) return;
//if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
//try
//{
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
// // ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
//}
//catch { }
}
private void ultHtOutIronGrid_Click(object sender, EventArgs e)
{
Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
// Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
if (aRow == null) return;
ultSelectIron.Text = aRow.Cells["InIronNo"].Text;
ArrayIronRow4[0] = aRow.Cells["InIronNo"].Text;
ArrayIronRow4[1] = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
ArrayIronRow4[2] = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
ArrayIronRow4[3] = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
ArrayIronRow4[6] = aRow.Cells["ReturnHeatNo"].Text;
ArrayIronRow4[7] = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
ArrayIronRow4[8] = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
ArrayIronRow4[9] = aRow.Cells["LDWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDWeight"].Text : "0";
ArrayIronRow4[10] = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
try
{
ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = aRow.Cells["InIronNo"].Text;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = aRow.Cells["QuXiang"].Text;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = aRow.Cells["OutTime"].Text;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = aRow.Cells["OutIronStyle"].Text;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = aRow.Cells["ReturnHeatNo"].Text;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = aRow.Cells["LDling"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDling"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["CHECKNO"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
}
catch { }
//Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtOutIronGrid.ActiveRow;
//if (aRow == null) return;
//ultSelectIron.Text = aRow.Cells["InIronNo"].Text;
//ArrayIronRow4[0] = aRow.Cells["InIronNo"].Text;
//ArrayIronRow4[1] = aRow.Cells["Tempture"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["Tempture"].Text : "0";
//ArrayIronRow4[2] = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
//ArrayIronRow4[3] = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
//ArrayIronRow4[6] = aRow.Cells["ReturnHeatNo"].Text;
//ArrayIronRow4[7] = aRow.Cells["ReturnWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["ReturnWeight"].Text : "0";
//ArrayIronRow4[8] = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
//ArrayIronRow4[9] = aRow.Cells["LDWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LDWeight"].Text : "0";
}
private void ultHtElementIron_AfterRowActivate(object sender, EventArgs e)
{
Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtElementIron.ActiveRow;
if (aRow == null) return;
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text != "自动") return;
try
{
ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["CHECKNO"].Text : "";
}
catch
{
}
}
///
/// 铁运进铁设置初始数据
///
private void SetGridNewIronData()
{
ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = "";
ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
ucInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = "";
ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = this.Text.Substring(0, 1);
}
///
/// 混铁炉进铁设置初始数据
///
private void SetGridNewIronData2()
{
ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "自动";
ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = "";
ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = "";
ucHtInIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = DateTime.Now;
ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
ucHtInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = "";
ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["Memo"].Value = "";
}
///
/// 设置出铁初始数据
///
private void SetGridNewIronData3()
{
ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "自动";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value = "1#转炉";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Value = "";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Value = ConvertShift("1", getshift());
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = ConvertShift("2", getshift());
ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Value = DateTime.Now;
ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Value = "正常出铁";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Value = "";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "0";
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "0";
}
///
/// EDITBUTTON事件
///
///
///
///
private void ucHtInIron1_ClickCellButton(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
switch (e.Cell.Column.Key)
{
case "IronLaiyuan":
{
弹出窗体.frmMixInIronNo frmMixInSource_1 = new 弹出窗体.frmMixInIronNo();
frmMixInSource_1.strMisNo = this.Text.Substring(0, 1);
using (frmMixInSource_1)
{
if (frmMixInSource_1.ShowDialog(this) == DialogResult.OK)
{
ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = frmMixInSource_1.C;
ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = frmMixInSource_1.Si;
ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = frmMixInSource_1.Mn;
ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = frmMixInSource_1.P;
ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = frmMixInSource_1.S;
ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = frmMixInSource_1.V;
ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = frmMixInSource_1.SourceID;
ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = frmMixInSource_1.BlastStoveNo;
ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = frmMixInSource_1.Temperature;
ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = frmMixInSource_1.CanWeight;
ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = frmMixInSource_1.GrossWeight;
ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = frmMixInSource_1.NetWeight;
ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = frmMixInSource_1.PotNo;
}
}
break;
}
default:
break;
}
}
private void ucInIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
float flPZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
float flMZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
float flJZ = Convert.ToSingle(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
switch (e.Cell.Column.Key)
{
case "LdMaoWeight":
{
try
{
if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
else if (flPZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
}
catch { }
break;
}
case "LdKongWeight":
{
try
{
if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
else if (flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
else if (flMZ > 0 && flJZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
}
catch { }
break;
}
case "IronWeight":
{
try
{
if (flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
else if (flMZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
else if (flMZ > 0 && flPZ > 0) ucInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
}
catch { }
break;
}
}
}
private void ucHtOutIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
float flPZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
float flMZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
float flJZ = Convert.ToSingle(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
switch (e.Cell.Column.Key)
{
case "LdMaoWeight":
{
try
{
if (flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
else if (flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
else if (flPZ > 0 && flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
}
catch { }
break;
}
case "LdKongWeight":
{
try
{
if (flMZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
else if (flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
else if (flMZ > 0 && flJZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
}
catch { }
break;
}
case "IronWeight":
{
try
{
if (flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
else if (flMZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
else if (flMZ > 0 && flPZ > 0) ucHtOutIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
}
catch { }
break;
}
case "ZhuanluLdNo":
{
try
{
string strStatus = "";
int intAge = 0;
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.ToString().Length > 0)
{
intAge= GetIronwrapAge(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text, out strStatus);
if (strStatus == "备用")
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = intAge + 1;
else
{
//MessageBox.Show("当前铁包状态【" + strStatus + "】不能使用!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "";
//ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
}
}
else
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDLing"].Value = "0";
}
catch
{ }
break;
}
}
}
private void ucHtInIron1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
{
float flPZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
float flMZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
float flJZ = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text : "0");
switch (e.Cell.Column.Key)
{
case "LdMaoWeight":
{
try
{
if (flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
else if (flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
else if (flPZ > 0 && flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
}
catch { }
break;
}
case "LdKongWeight":
{
try
{
if (flMZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
else if (flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flPZ + flJZ);
else if (flMZ > 0 && flJZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(flMZ - flPZ);
}
catch { }
break;
}
case "IronWeight":
{
try
{
if (flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
else if (flMZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Value = Convert.ToString(flMZ - flJZ);
else if (flMZ > 0 && flPZ > 0) ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Value = Convert.ToString(flJZ + flPZ);
}
catch { }
break;
}
}
//switch (e.Cell.Column.Key)
//{
// case "LdKongWeight":
// {
// try
// {
// float a = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
// float b = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
// ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(b - a);
// }
// catch { }
// break;
// }
// case "LdMaoWeight":
// {
// try
// {
// float a = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdKongWeight"].Text : "0");
// float b = Convert.ToSingle(ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text != System.DBNull.Value.ToString() ? ucHtInIron1.ultraGrid1.Rows[0].Cells["LdMaoWeight"].Text : "0");
// ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = Convert.ToString(b - a);
// }
// catch { }
// break;
// }
//}
}
///
/// editbutton事件的委托
///
private void SetUserControlDelegate()
{
ucHtInIron1.ultraGrid1.ClickCellButton += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtInIron1_ClickCellButton);
ucHtInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtInIron1_CellChange);
ucInIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucInIron1_CellChange);
ucHtOutIron1.ultraGrid1.CellChange += new Infragistics.Win.UltraWinGrid.CellEventHandler(ucHtOutIron1_CellChange);
}
#endregion
#region function
private string ConvertShift(string flag, string shift)
{
string StrReturn = "";
if (flag == "1" & shift != "" & shift != null)
{
switch (shift.Substring(0, 1))
{
case "1":
StrReturn = "白";
break;
case "2":
StrReturn = "中";
break;
case "3":
StrReturn = "夜";
break;
}
}
else if (flag == "2" & shift.Length > 1)
{
switch (shift.Substring(1, 1))
{
case "1":
StrReturn = "甲";
break;
case "2":
StrReturn = "乙";
break;
case "3":
StrReturn = "丙";
break;
case "4":
StrReturn = "丁";
break;
}
}
else if (flag == "3" & shift != "")
{
switch (shift.Trim())
{
case "白":
StrReturn = "1";
break;
case "中":
StrReturn = "2";
break;
case "夜":
StrReturn = "3";
break;
}
}
else if (flag == "4" & shift != "")
{
switch (shift.Trim())
{
case "甲":
StrReturn = "1";
break;
case "乙":
StrReturn = "2";
break;
case "丙":
StrReturn = "3";
break;
case "丁":
StrReturn = "4";
break;
}
}
return StrReturn;
}
private string getshift()
{
string err = "";
//CallingMessage par = new CallingMessage();
//par.ServerName = "lgJobMgt";
//par.AssemblyName = "Core.LgMes.Server.lgJobMgt";
//par.ClassName = "Core.LgMes.Server.lgJobMgt.classCommonModule";
//par.MethodName = "GetCurrDuty";
//par.args = new object[] { };
string ds = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod(par, out err);
if (ds != "")
{
return ds;
}
else
{
return "";
}
}
///
/// 设置班组下拉框
///
///
private void SetColumnModeGroup(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
{
DataTable dt = new DataTable();
dt.TableName = "JIALIAO";
DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("BCNA", Type.GetType("System.String"));
dt.Columns.Add(dc);
DataRow dr = dt.NewRow();
dr["BCBM"] = "1";
dr["BCNA"] = "白";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "2";
dr["BCNA"] = "中";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "3";
dr["BCNA"] = "夜";
dt.Rows.Add(dr);
//Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Group", 0, "班 组", 60, Grid, dt, "BCBM", "BCNA");
}
///
/// 设置班组下拉框
///
///
private void SetColumnModeShift(Infragistics.Win.UltraWinGrid.UltraGridBase Grid)
{
DataTable dt = new DataTable();
dt.TableName = "JIALIAO";
DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("BCNA", Type.GetType("System.String"));
dt.Columns.Add(dc);
DataRow dr = dt.NewRow();
dr["BCBM"] = "1";
dr["BCNA"] = "甲";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "2";
dr["BCNA"] = "乙";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "3";
dr["BCNA"] = "丙";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "4";
dr["BCNA"] = "丁";
dt.Rows.Add(dr);
//Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("Shift", 0, "班组", 60, Grid, dt, "BCBM", "BCNA");
}
///
/// 设置去向
///
private void SetColumnModequxiang()
{
DataTable dt = new DataTable();
dt.TableName = "JIALIAO";
DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("BCNA", Type.GetType("System.String"));
dt.Columns.Add(dc);
DataRow dr = dt.NewRow();
dr["BCBM"] = "1";
dr["BCNA"] = "1#混铁炉";
dt.Rows.Add(dr);
//dr = dt.NewRow();
//dr["BCBM"] = "2";
//dr["BCNA"] = "2#混铁炉";
//dt.Rows.Add(dr);
//Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCell("IronQuxiang", 0, "铁水去向", 135, ucInIron1.ultraGrid1, dt, "BCBM", "BCNA");
}
///
/// 设置去向
///
private void SetColumnModeOutquxiang()
{
DataTable dt = new DataTable();
dt.TableName = "JIALIAO";
DataColumn dc = new DataColumn("BCBM", Type.GetType("System.String"));
dt.Columns.Add(dc);
dc = new DataColumn("BCNA", Type.GetType("System.String"));
dt.Columns.Add(dc);
DataRow dr = dt.NewRow();
dr["BCBM"] = "1";
dr["BCNA"] = "1#转炉";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "2";
dr["BCNA"] = "2#转炉";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "3";
dr["BCNA"] = "3#转炉";
dt.Rows.Add(dr);
dr = dt.NewRow();
dr["BCBM"] = "4";
dr["BCNA"] = "1#预处理";
dt.Rows.Add(dr);
//dr = dt.NewRow();
//dr["BCBM"] = "5";
// dr["BCNA"] = "2#预处理";
// dt.Rows.Add(dr);
//Core.LgMes.Client.LgIntegrationQuery.JJBStaticFunction.SetGridDropDownListCellEdit("IronQuxiang", 0, "铁水去向", 100, ucHtOutIron1.ultraGrid1, dt, "BCBM", "BCNA");
}
///
/// 序号栏锁定
///
private void SetMisnoNoEdite()
{
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
}
///
/// 序号栏锁定
///
private void SetMisnoNoEdite2()
{
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
}
///
/// 序号栏锁定
///
private void SetMisnoNoEdite3()
{
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
}
private void timer1_Tick(object sender, EventArgs e)
{
RefreshHighheatNo();
// GetCVTHeatno();
}
///
/// 设置铁运进铁 按钮状态
///
///
///
private void setbutton(string flag)
{
switch (flag)
{
case "1":
ulbtnAdd.Enabled = true;
ulbtnEdit.Enabled = true;
ulbtnDelete.Enabled = true;
ulbtnSave.Enabled = false;
ulbtnCancel.Enabled = false;
ulbtnRef.Enabled = true;
ulbtnHisRequir.Enabled = true;
break;
case "2":
ulbtnAdd.Enabled = false;
ulbtnEdit.Enabled = false;
ulbtnDelete.Enabled = false;
ulbtnSave.Enabled = true;
ulbtnCancel.Enabled = true;
ulbtnRef.Enabled = true;
ulbtnHisRequir.Enabled = true;
break;
}
}
///
/// 设置混铁炉进铁按钮状态
///
///
private void setbutton2(string flag)
{
switch (flag)
{
case "1":
ulbtnAdd2.Enabled = true;
ulbtnEdit2.Enabled = true;
ulbtnDelete2.Enabled = true;
ulbtnSave2.Enabled = false;
ulbtnCancel2.Enabled = false;
ulbtnRef2.Enabled = true;
ulbtnHisRequir2.Enabled = true;
break;
case "2":
ulbtnAdd2.Enabled = false;
ulbtnEdit2.Enabled = false;
ulbtnDelete2.Enabled = false;
ulbtnSave2.Enabled = true;
ulbtnCancel2.Enabled = true;
ulbtnRef2.Enabled = true;
ulbtnHisRequir2.Enabled = true;
break;
}
}
///
/// 设置出铁界面BUTTON
///
///
private void setbutton3(string flag)
{
switch (flag)
{
case "1":
ulbtnAdd3.Enabled = true;
ulbtnEdit3.Enabled = true;
ulbtnDelete3.Enabled = true;
ulbtnSave3.Enabled = false;
ulbtnCancel3.Enabled = false;
ulbtnRef3.Enabled = true;
ulbtnHisRequir3.Enabled = true;
break;
case "2":
ulbtnAdd3.Enabled = false;
ulbtnEdit3.Enabled = false;
ulbtnDelete3.Enabled = false;
ulbtnSave3.Enabled = true;
ulbtnCancel3.Enabled = true;
ulbtnRef3.Enabled = true;
ulbtnHisRequir3.Enabled = true;
break;
}
}
///
/// 设置 ucInIron Grid的读写状态
/// 1:NoEDIT 2:ALLOWEDIT
///
///
private void setucInIron(string flag)
{
switch (flag)
{
case "1":
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Override.CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
break;
case "2":
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucInIron1.ultraGrid1.DisplayLayout.Override.CellAppearance.BackColor = Color.LightBlue;
break;
}
}
///
/// 设置 ucHtInIron Grid的读写状态
/// 1:NoEDIT 2:ALLOWEDIT
///
///
private void setucHtInIron(string flag)
{
switch (flag)
{
case "1":
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
break;
case "2":
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
break;
}
}
///
/// 设置出铁GRID
///
///
///
private void setucHtInIron3(string flag)
{
switch (flag)
{
case "1":
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
break;
case "2":
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[1].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[2].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[3].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[4].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[5].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[6].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[7].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[8].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[9].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[10].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[11].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[12].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[13].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[14].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[15].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[16].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[17].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[19].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[20].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[21].CellActivation = Infragistics.Win.UltraWinGrid.Activation.AllowEdit;
ucHtOutIron1.ultraGrid1.DisplayLayout.Override.RowAppearance.BackColor = Color.LightBlue;
break;
}
}
private static bool IsDouble(string AValue)
{
try
{
Convert.ToDouble(AValue);
return true;
}
catch
{
return false;
}
}
///
/// 数据CHECK
///
///
private bool CheckData()
{
if (ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
if (ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
if (ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
if (ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
if (ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
if (ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
if (ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
if (ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
if (ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
if (ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
ucInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
//if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
//{
// return false;
//}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
{
return false;
}
if (!IsDouble(ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
{
return false;
}
return true;
}
private bool CheckData2()
{
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
//if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
//{
// return false;
//}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
{
return false;
}
if (!IsDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
{
return false;
}
return true;
}
private bool CheckData3()
{
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = "0";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = "0";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = "0";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Value = "";
if (ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text.Trim().Length == 0)
ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Value = "";
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLdNo"].Text))
{
return false;
}
if (!IsDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text))
{
return false;
}
return true;
}
///
/// 取铁运进铁的数据 到数组
///
private void GetGridData()
{
try
{
ArrayIronRow[0] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text;
ArrayIronRow[1] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
ArrayIronRow[2] = ConvertShift("3", ucInIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucInIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
ArrayIronRow[3] = ucInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Text;
ArrayIronRow[4] = ucInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
ArrayIronRow[5] = ucInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Text;
ArrayIronRow[6] = ucInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
ArrayIronRow[7] = ucInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
ArrayIronRow[8] = ucInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
ArrayIronRow[9] = ucInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
ArrayIronRow[10] = ucInIron1.ultraGrid1.Rows[0].Cells["C"].Text;
ArrayIronRow[11] = ucInIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
ArrayIronRow[12] = ucInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
ArrayIronRow[13] = ucInIron1.ultraGrid1.Rows[0].Cells["P"].Text;
ArrayIronRow[14] = ucInIron1.ultraGrid1.Rows[0].Cells["S"].Text;
ArrayIronRow[15] = ucInIron1.ultraGrid1.Rows[0].Cells["As"].Text;
ArrayIronRow[16] = ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
ArrayIronRow[17] = User;
}
catch { }
}
///
/// 取混铁炉进铁的数据 到数组
///
private void GetGridData2()
{
try
{
ArrayIronRow2[0] = ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text;
ArrayIronRow2[1] = ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Text;
ArrayIronRow2[2] = ConvertShift("3", ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucHtInIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
ArrayIronRow2[3] = ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Text;
ArrayIronRow2[4] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
ArrayIronRow2[5] = ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Text;
ArrayIronRow2[6] = ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
ArrayIronRow2[7] = ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
ArrayIronRow2[8] = ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
ArrayIronRow2[9] = ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text;
ArrayIronRow2[10] = ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Text;
ArrayIronRow2[11] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
ArrayIronRow2[12] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
ArrayIronRow2[13] = ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Text;
ArrayIronRow2[14] = ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Text;
ArrayIronRow2[15] = ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Text;
ArrayIronRow2[16] = ucHtInIron1.ultraGrid1.Rows[0].Cells["Ironlaiyuan"].Text;
ArrayIronRow2[17] = ucHtInIron1.ultraGrid1.Rows[0].Cells["memo"].Text;
ArrayIronRow2[18] = User;
}
catch { }
}
///
/// 取得出铁GRID数据
///
///
///
private void GetGridData3()
{
try
{
ArrayIronRow3[0] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text;
ArrayIronRow3[1] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtState"].Text; //混铁炉状态
ArrayIronRow3[2] = ConvertShift("3", ucHtOutIron1.ultraGrid1.Rows[0].Cells["Group"].Text) + ConvertShift("4", ucHtOutIron1.ultraGrid1.Rows[0].Cells["shift"].Text);
ArrayIronRow3[3] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronTime"].Text;
ArrayIronRow3[4] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Text;
ArrayIronRow3[5] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ZhuanluLDno"].Text;
ArrayIronRow3[6] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Text;
ArrayIronRow3[7] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Text;
ArrayIronRow3[8] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text;
ArrayIronRow3[9] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text;
ArrayIronRow3[10] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["C"].Text;
ArrayIronRow3[11] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Si"].Text;
ArrayIronRow3[12] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["Mn"].Text;
ArrayIronRow3[13] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["P"].Text;
ArrayIronRow3[14] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["S"].Text;
ArrayIronRow3[15] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["As"].Text;
ArrayIronRow3[16] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text;
ArrayIronRow3[17] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnHeatNo"].Text;
ArrayIronRow3[18] = User;
ArrayIronRow3[19] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["ReturnWeight"].Text;
ArrayIronRow3[20] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronStyl"].Text;//出铁类型
ArrayIronRow3[21] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["LDling"].Text;
ArrayIronRow3[22] = ucHtOutIron1.ultraGrid1.Rows[0].Cells["CHECKNO"].Text; //成分检验码
}
catch { }
}
#endregion
#region buttonevent
private void ulbtnAdd_Click(object sender, EventArgs e)
{
setbutton("2");
setucInIron("2");
SetMisnoNoEdite();
SetGridNewIronData();
}
private void ulbtnEdit_Click(object sender, EventArgs e)
{
blModify = true;
setbutton("2");
setucInIron("2");
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
}
private void ulbtnDelete_Click(object sender, EventArgs e)
{
if (ultraGrid2.ActiveRow == null || ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
string strWhere = "where MISID='" + ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text + "'";
try
{
string strError = "";
// Core.Mes.ClientFrameWork.ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt", "Core.LgMes.Server.lgJobMgt.classIronJob", "DeleteIronData", new object[] { strWhere }, out strError);
if (strError == "")
MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ee)
{
string s = ee.Message;
}
GetInIronData();
}
private void ulbtnSave_Click(object sender, EventArgs e)
{
if (CheckData() == false)
{
MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if (ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Value.ToString().Length > 0 && ucInIron1.ultraGrid1.Rows[0].Cells["IronQuxiang"].Text.Substring(1, 1) != "#")
{
MessageBox.Show(this, "请选择铁水去向!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
InsertData();
GetInIronData();
}
private void ulbtnCancel_Click(object sender, EventArgs e)
{
setbutton("1");
setucInIron("1");
ucInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "";
ultraGrid2_AfterRowActivate(null, null);
blModify = false;
}
private void ulbtnRef_Click(object sender, EventArgs e)
{
GetInIronData();
}
private void ulbtnHisRequir_Click(object sender, EventArgs e)
{
frmRequryInIron frm1 = new frmRequryInIron();
frm1.MdiParent = this.MdiParent;
// frm3.RemotingHelp = this.RemotingHelp;
frm1.Show();
}
private void ulbtnRef2_Click(object sender, EventArgs e)
{
GetHtInIronData();
}
private void ulbtnAdd2_Click(object sender, EventArgs e)
{
setbutton2("2");
setucHtInIron("2");
SetMisnoNoEdite2();
SetGridNewIronData2();
}
private void ulbtnEdit2_Click(object sender, EventArgs e)
{
setbutton2("2");
setucHtInIron("2");
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[0].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellActivation = Infragistics.Win.UltraWinGrid.Activation.NoEdit;
ucHtInIron1.ultraGrid1.DisplayLayout.Bands[0].Columns[18].CellAppearance.BackColor = System.Drawing.SystemColors.ActiveBorder;
}
private void ulbtnDelete2_Click(object sender, EventArgs e)
{
if (ultHtInIronGrid.ActiveRow == null || ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
GetGridData2(); //初始化进铁记录
if (string.IsNullOrEmpty(ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text.Trim()))
{
MessageBox.Show("进铁序号不能为空,请选择进铁信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
string strWhere = "where MISID='" + ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text + "'";
try
{
string strError = "";
//hengxing
//ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
// "Core.LgMes.Server.lgJobMgt.classIronJob",
// "DeleteHtIronData",
// new object[] { strWhere,
// ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text,
// Convert.ToDouble(ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text),
// ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Text,ArrayIronRow2}, out strError);
if (strError == "")
MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ee)
{
string s = ee.Message;
}
GetHtInIronData();
}
private void ulbtnSave2_Click(object sender, EventArgs e)
{
if (CheckData2() == false)
{
MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
InsertData2();
GetHtInIronData();
}
private void ulbtnCancel2_Click(object sender, EventArgs e)
{
setbutton2("1");
setucHtInIron("1");
ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = "";
ultHtInIronGrid_AfterRowActivate_1(null, null);
}
private void ulbtnHisRequir2_Click(object sender, EventArgs e)
{
frmRequryhtInIron frm2 = new frmRequryhtInIron();
frm2.MdiParent = this.MdiParent;
// frm3.RemotingHelp = this.RemotingHelp;
frm2.Show();
}
private void ulbtnAdd3_Click(object sender, EventArgs e)
{
setbutton3("2");
setucHtInIron3("2");
SetMisnoNoEdite3();
SetGridNewIronData3();
}
private void ulbtnEdit3_Click(object sender, EventArgs e)
{
setbutton3("2");
setucHtInIron3("2");
SetMisnoNoEdite3();
}
private void ulbtnDelete3_Click(object sender, EventArgs e)
{
if (ultHtOutIronGrid.ActiveRow == null || ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text == "自动") return;
if (MessageBox.Show(this, "您确定要删除该记录?", "提问",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) return;
string strWhere = "where MISID='" + ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Text + "'";
try
{
string strError = "";
//hengxing
//ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
// "Core.LgMes.Server.lgJobMgt.classIronJob",
// "DeleteHtOutIronData",
// new object[] { strWhere,
// ucHtOutIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Text,
// Convert.ToDouble(ucHtOutIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Text) }, out strError);
if (strError == "")
MessageBox.Show("删除记录成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
else
MessageBox.Show("删除记录失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
catch (Exception ee)
{
string s = ee.Message;
}
GetHtOutIronData();
}
private void ulbtnSave3_Click(object sender, EventArgs e)
{
if (CheckData3() == false)
{
MessageBox.Show(this, "输入的数据不完整或错误,请检查!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
InsertData3();
GetHtOutIronData();
}
private void ulbtnCancel3_Click(object sender, EventArgs e)
{
setbutton3("1");
setucHtInIron3("1");
ucHtOutIron1.ultraGrid1.Rows[0].Cells["OutIronNo"].Value = "";
ultHtOutIronGrid_Click(null, null);
}
private void ulbtnRef3_Click(object sender, EventArgs e)
{
GetHtOutIronData();
GetElementData();
}
private void ulbtnHisRequir3_Click(object sender, EventArgs e)
{
frmRequryhtoutIron frm3 = new frmRequryhtoutIron();
frm3.MdiParent = this.MdiParent;
frm3.Show();
}
private void ulbtnCVT1_Click(object sender, EventArgs e)
{
if (txtCVT1.Text.Trim().Length == 0)
{
MessageBox.Show("1#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
if (ArrayIronRow4[0].Trim().Length > 0)
{
ArrayIronRow4[4] = txtCVT1.Text;
ArrayIronRow4[5] = "CVT";
SendIronToCvt();
ArrayIronRow4[0] = "";
ArrayIronRow4[1] = "";
ArrayIronRow4[2] = "";
ArrayIronRow4[3] = "";
ArrayIronRow4[4] = "";
ArrayIronRow4[5] = "";
ArrayIronRow4[6] = "";
ArrayIronRow4[7] = "";
GetHtOutIronData();
}
else
MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
private void ulbtnCVT2_Click(object sender, EventArgs e)
{
if (txtCVT2.Text.Trim().Length == 0)
{
MessageBox.Show("2#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
if (ArrayIronRow4[0].Trim().Length > 0)
{
ArrayIronRow4[4] = txtCVT2.Text;
ArrayIronRow4[5] = "CVT";
SendIronToCvt();
ArrayIronRow4[0] = "";
ArrayIronRow4[1] = "";
ArrayIronRow4[2] = "";
ArrayIronRow4[3] = "";
ArrayIronRow4[4] = "";
ArrayIronRow4[5] = "";
ArrayIronRow4[6] = "";
ArrayIronRow4[7] = "";
GetHtOutIronData();
}
else
MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
private void ulbtnCVT3_Click(object sender, EventArgs e)
{
if (txtCVT3.Text.Trim().Length == 0)
{
MessageBox.Show("3#转炉没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
if (ArrayIronRow4[0].Trim().Length > 0)
{
ArrayIronRow4[4] = txtCVT3.Text;
ArrayIronRow4[5] = "CVT";
SendIronToCvt();
ArrayIronRow4[0] = "";
ArrayIronRow4[1] = "";
ArrayIronRow4[2] = "";
ArrayIronRow4[3] = "";
ArrayIronRow4[4] = "";
ArrayIronRow4[5] = "";
ArrayIronRow4[6] = "";
ArrayIronRow4[7] = "";
GetHtOutIronData();
}
else
MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
private void ulbtnHMP1_Click(object sender, EventArgs e)
{
if (txtHMP1.Text.Trim().Length == 0)
{
MessageBox.Show("1#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
if (ArrayIronRow4[0].Trim().Length > 0)
{
ArrayIronRow4[4] = _strHmp1No; // txtHMP1.Text;
ArrayIronRow4[5] = "HMP";
SendIronToCvt();
ArrayIronRow4[0] = "";
ArrayIronRow4[1] = "";
ArrayIronRow4[2] = "";
ArrayIronRow4[3] = "";
ArrayIronRow4[4] = "";
ArrayIronRow4[5] = "";
ArrayIronRow4[6] = "";
ArrayIronRow4[7] = "";
ArrayIronRow4[8] = "";
ArrayIronRow4[9] = "";
ArrayIronRow4[10] = "";
GetHtOutIronData();
}
else
MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
private void ulbtnHMP2_Click(object sender, EventArgs e)
{
if (txtHMP2.Text.Trim().Length == 0)
{
MessageBox.Show("2#铁水预处理没有生产!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
return;
}
if (ArrayIronRow4[0].Trim().Length > 0)
{
ArrayIronRow4[4] = _strHmp2No;// txtHMP2.Text;
ArrayIronRow4[5] = "HMP";
SendIronToCvt();
ArrayIronRow4[0] = "";
ArrayIronRow4[1] = "";
ArrayIronRow4[2] = "";
ArrayIronRow4[3] = "";
ArrayIronRow4[4] = "";
ArrayIronRow4[5] = "";
ArrayIronRow4[6] = "";
ArrayIronRow4[7] = "";
ArrayIronRow4[8] = "";
ArrayIronRow4[9] = "";
ArrayIronRow4[10] = "";
GetHtOutIronData();
}
else
MessageBox.Show("没选择要发送的铁水信息!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
#endregion
///
/// 获取铁包包龄
///
///
///
private int GetIronwrapAge(string strIronwrapID,out string strStatus)
{
string strErr = "";
int intIronAge = 0;
string _strStatus = "";
object obj =null;// ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
// "Core.LgMes.Server.lgJobMgt.classIronJob",
// "GetIronwrapAge", new object[] { "res_mis_taphole", strIronwrapID }, out strErr);
if (strErr == "")
{
DataSet ds = (DataSet)obj;
if (ds.Tables.Count > 0)
{
if (ds.Tables[0].Rows.Count > 0)
{
intIronAge = Convert.ToInt32(ds.Tables[0].Rows[0][0]);
_strStatus = ds.Tables[0].Rows[0]["STATUS"].ToString();
}
}
}
strStatus = _strStatus;
return intIronAge;
}
private void ultraGrid4_KeyDown(object sender, KeyEventArgs e)
{
if (e.KeyCode != Keys.Enter)
return;
ultraGrid4.UpdateData();
string keyStr = ultraGrid4.ActiveCell.Column.Key;
double valueStr = 0;
string strFindName = "";
string strErr = "";
if (keyStr == "AllInrion" || keyStr == "OutIronAll" || keyStr == "ZhiDuiAll")
{
if (keyStr == "AllInrion") strFindName = "IMPORTIRONTOTAL";
if (keyStr == "OutIronAll") strFindName = "EXPORTIRONTOTAL";
if (keyStr == "ZhiDuiAll") strFindName = "SKIPIRONTOTAL";
try
{
if (ultraGrid4.ActiveCell.Value.ToString() != "")
{
valueStr = Convert.ToDouble(ultraGrid4.ActiveCell.Value);
object obj = null;// ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
// "Core.LgMes.Server.lgJobMgt.classIronJob",
// "StatIronWeight", new object[] { this.Text.Substring(0, 1), strFindName, 0, valueStr, 2 }, out strErr);
if (strErr == "")
ultraGrid4.ActiveCell.Value = valueStr;
else
MessageBox.Show("修改数据失败!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
}
}
catch (Exception ex)
{
string Msg = ex.Message;
MessageBox.Show("输入数据格式错误,请改正!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
}
private void HeatNo_HudwId_Exist(string strID)
{
string strErr = "";
string strGw = "";
if (strID.Substring(0, 1) == "H" )
strGw = strID.Substring(0, 2);
else
strGw = strID.Substring(2, 1);
string obj = "";// (string)ClientCommon._RemotingHelp.ExecuteMethod("lgJobMgt",
// "Core.LgMes.Server.lgJobMgt.classIronJob",
// "HeatNo_HudwId_Exist", new object[] { strID }, out strErr);
if (strErr == "")
{
switch (strGw)
{
case "H1":
_strSendSucceededForHmp1 = obj;
break;
case "H2":
_strSendSucceededForHmp2 = obj;
break;
case "1":
_strSendSucceededForBof1 = obj;
break;
case "2":
_strSendSucceededForBof2 = obj;
break;
case "3":
_strSendSucceededForBof3 = obj;
break;
default:
break;
}
}
}
private void ultHtInIronGrid_AfterRowActivate_1(object sender, EventArgs e)
{
Infragistics.Win.UltraWinGrid.UltraGridRow aRow = ultHtInIronGrid.ActiveRow;
// Infragistics.Win.UltraWinGrid.UltraGridRow aRow = e.Row;
if (aRow == null) return;
if (ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Text == "自动") return;
try
{
ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronNo"].Value = aRow.Cells["InIronNo"].Text;
ucHtInIron1.ultraGrid1.Rows[0].Cells["HighNo"].Value = aRow.Cells["HighNo"].Value != System.DBNull.Value ? aRow.Cells["HighNo"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["Temptrue"].Value = aRow.Cells["Tempture"].Value != System.DBNull.Value ? aRow.Cells["Tempture"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["LDKongWeight"].Value = aRow.Cells["LdWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["LdWeight"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["LDMaoWeight"].Value = aRow.Cells["MaoWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MaoWeight"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["IronWeight"].Value = aRow.Cells["JingWeight"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["JingWeight"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["GuanNo"].Value = aRow.Cells["HighLDno"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["HighLDno"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["InIronTime"].Value = aRow.Cells["InTime"].Text;
ucHtInIron1.ultraGrid1.Rows[0].Cells["Group"].Value = aRow.Cells["shift"].Text;
ucHtInIron1.ultraGrid1.Rows[0].Cells["Shift"].Value = aRow.Cells["group"].Text;
ucHtInIron1.ultraGrid1.Rows[0].Cells["IronLaiyuan"].Value = aRow.Cells["QuXiang"].Text;
ucHtInIron1.ultraGrid1.Rows[0].Cells["HtHeatNo"].Value = this.Text.Substring(0, 1);
ucHtInIron1.ultraGrid1.Rows[0].Cells["Memo"].Value = aRow.Cells["Memo"].Text;
ucHtInIron1.ultraGrid1.Rows[0].Cells["C"].Value = aRow.Cells["C"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["C"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["Si"].Value = aRow.Cells["SI"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["SI"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["Mn"].Value = aRow.Cells["MN"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["MN"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["P"].Value = aRow.Cells["P"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["P"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["S"].Value = aRow.Cells["S"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["S"].Text : "0";
ucHtInIron1.ultraGrid1.Rows[0].Cells["As"].Value = aRow.Cells["As"].Value.ToString() != System.DBNull.Value.ToString() ? aRow.Cells["AS"].Text : "0";
}
catch { }
}
private void ultraTabControl2_SelectedTabChanged(object sender, Infragistics.Win.UltraWinTabControl.SelectedTabChangedEventArgs e)
{
if (e.Tab.Index == 1)
GetElementData();
}
}
}