using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; namespace Core.LZMes.Client.UIM { public partial class UIM010130 : FrmBase { //钢卷号 private string COIL_NO = ""; public UIM010130() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; case "Save": this.DoSave(); break; case "Exit": this.Close(); break; } } /// /// 查询钢卷在系统中的位置 /// private void DoQuery() { try { this.dataSet1.Tables[0].Clear(); string coilNo = "R" + this.textBox1.Text.Trim() + "-" + this.textBox2.Text.Trim() + "A" + this.textBox3.Text.Trim(); //外购卷入库可以直接调用中间库入库查询钢卷信息 CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIM.UIM010120"; ccp.MethodName = "queryCoilStatus"; ccp.ServerParams = new object[] { coilNo }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); COIL_NO = coilNo; } catch (Exception EX) { MessageBox.Show(EX.ToString()); } } /// /// 中间库外购卷入库 /// private void DoSave() { if (this.dataTable1.Rows.Count < 1) { MessageBox.Show("没有查询到相应的钢卷信息!"); return; } //判断入库班次、班组、入库人、时间输入是否正确 if (-1 == this.ultraComboEditor1.SelectedIndex) { MessageBox.Show("请选择相应的入库班次!"); this.ultraComboEditor1.Focus(); return; } if (-1 == this.ultraComboEditor2.SelectedIndex) { MessageBox.Show("请选择相应的入库班组!"); this.ultraComboEditor2.Focus(); return; } //判断成份信息是否输入 if (null == this.textBox4.Text || "".Equals(this.textBox4.Text)) { MessageBox.Show("请输入炉号!"); this.textBox4.Focus(); return; } if (null == this.textBox5.Text || "".Equals(this.textBox5.Text)) { MessageBox.Show("请输入工序!"); this.textBox5.Focus(); return; } if (null == this.textBox6.Text || "".Equals(this.textBox6.Text)) { MessageBox.Show("请输入次数!"); this.textBox6.Focus(); return; } if (null == this.textBox7.Text || "".Equals(this.textBox7.Text)) { MessageBox.Show("请输入元素名!"); this.textBox7.Focus(); return; } if (null == this.textBox8.Text || "".Equals(this.textBox8.Text)) { MessageBox.Show("请输入实际值!"); this.textBox8.Focus(); return; } UIM010041 dlg = null;// new UIM010041("2"); if (DialogResult.OK == dlg.ShowDialog(this)) { string yardAddr = dlg.YARD_ADDR;//垛位 string entryShift = this.ultraComboEditor1.Text;//入库班次 string entryGroup = this.ultraComboEditor2.Text;//入库班组 string entryDtime = this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMddHHmmss");//入库时间 string reg_id = this.UserInfo.GetUserID();//操作人 //成份信息 string chargeNo = this.textBox4.Text;//炉号 string procCd = this.textBox5.Text;//工序 string chemSeq = this.textBox6.Text;//次数 string chemCd = this.textBox7.Text;//元素名 string chemVar = this.textBox8.Text;//实际值 string imgrRmk = this.textBox10.Text;//备注 string element = chargeNo + "|" + procCd + "|" + chemSeq + "|" + chemCd + "|" + chemVar + "|" + imgrRmk; //性能信息 string performance = ""; //录入入库信息 CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIM.UIM010130"; ccp.MethodName = "saveCoilYard"; ccp.ServerParams = new object[] { COIL_NO, yardAddr, entryShift, entryGroup, entryDtime, reg_id, element, performance }; ccp = this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); } } } }