using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using CoreFS.CA06; namespace Core.LgMes.Client.LgJobMgt { public partial class frmSendJXY : Form { public string strHeatNO = ""; //炉号 public string strStationCode = ""; //岗位 public string strDisposalTime = ""; //处理次数 public string strSteelCode = ""; //牌号编码 public string strSteel = ""; //牌号 public string strFlowNo = ""; //流号 public string strOptName = ""; //操作员 public frmSendJXY() { InitializeComponent(); } private void frmSendJXY_Load(object sender, EventArgs e) { txtHeatNo.Text = strHeatNO; txtSteel.Text = strSteel; if (strStationCode == "2" || strStationCode == "3") { cbbFlowNo.Items[0].DisplayText = "0流"; cbbFlowNo.Items[1].DisplayText = "1流"; cbbFlowNo.Items[2].DisplayText = "2流"; cbbFlowNo.Items[3].DisplayText = "3流"; cbbFlowNo.Items[4].DisplayText = "4流"; } } private void btnSend_Click(object sender, EventArgs e) { if (strHeatNO == "" || cbbFlowNo.SelectedIndex==-1) { MessageBox.Show("请选择要发送金相指示的流号!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); return; } if (strStationCode == "2" || strStationCode == "3") strFlowNo = Convert.ToString(Convert.ToInt32(cbbFlowNo.Value) - 1); else strFlowNo = cbbFlowNo.Value.ToString(); object[] sArgs = new object[6]; sArgs[0] = strHeatNO; //熔炼号 sArgs[1] = strStationCode; //岗位 sArgs[2] = strDisposalTime;//处理次数 sArgs[3] = strSteelCode; //牌号 sArgs[4] = strOptName; //操作员 sArgs[5] = strFlowNo; //流号 string strError = ""; DialogResult result = DialogResult.No; result = MessageBox.Show(this, "确认要发送金相指示吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1); if (result == DialogResult.Yes) { try { //hengxing //ClientCommon._RemotingHelp.ExecuteMethod("lgResMgt", // "Core.LgMes.Server.LgResMgt.LfsCollect", // "SendJXYZS", new object[] { sArgs }, out strError); if (strError != "") { MessageBox.Show("发送金相指示失败!\n" + strError, "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } else this.Close(); } catch (System.Exception exp) { MessageBox.Show("发送金相指示失败!\n" + exp.ToString(), "错误!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } } private void btnNo_Click(object sender, EventArgs e) { this.Close(); } } }