using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA06; using System.Collections; //using Core.LZMes.Client.UIF; namespace Core.LZMes.Client.UIB { public partial class UIB010301 : FrmBase { public UIB010301() { InitializeComponent(); } private void UIB010301_Load(object sender, EventArgs e) { //this.ultraComboEditor1.SelectedIndex = 0; } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; } } private void ultraComboEditor1_TextChanged(object sender, EventArgs e) { //获取满足条件的所有合同号 //CoreClientParam ccp = new CoreClientParam(); //ArrayList al = new ArrayList(); //al.Add("UIB010301_01.SELECT"); //al.Add(this.ultraComboEditor1.Text); //ccp.ServerName = "UIB.COM.ComDBQuery"; //ccp.MethodName = "doSimpleQuery"; //ccp.ServerParams = new object[] { al }; //ccp.SourceDataTable = this.dataSet1.Tables[0]; //this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); // //this.comboBoxOrdNO.DataSource = this.dataSet1.Tables[0].DefaultView; //for (int i = 0; i < this.dataSet1.Tables[0].Rows.Count; i++) //{ // this.comboBoxOrdNO.Items.Add(this.dataSet1.Tables[0].Rows[i][0].ToString()); //} } public void DoQuery() { try { CoreClientParam ccp = new CoreClientParam(); ArrayList list = new ArrayList(); ArrayList al = new ArrayList(); al.Add("UIB010301_01.SELECT");//总 al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); //成分 al = new ArrayList();//单一元素 al.Add("UIB010301_CHEM_01.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); al = new ArrayList();//复合成分 al.Add("UIB010301_CHEM_02.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); //材质 al = new ArrayList();//检验项目 al.Add("UIB010301_QLTY_01.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); al = new ArrayList();//取样信息 al.Add("UIB010301_QLTY_02.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); al = new ArrayList();//交付条件 al.Add("UIB010301_DEL_01.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); al = new ArrayList();//炼钢规范 al.Add("UIB010301_SMS_01.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); al = new ArrayList();//热轧规范 al.Add("UIB010301_MILL_01.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); al = new ArrayList();//冷轧规范 al.Add("UIB010301_COLD_01.SELECT"); al.Add(this.textBoORD.Text); al.Add(this.textBoxSEQ.Text); list.Add(al); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doContinuousQluery"; ccp.ServerParams = new object[] { list }; CoreClientParam ccpList = this.ExecuteQuery(ccp, CoreInvokeType.Internal); if (ccpList.ReturnInfo.Length == 0) { ArrayList aList = ccpList.ReturnObject as ArrayList; if (aList[0] != null) { this.dataSet1.Tables["TOTAL"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[0] as ArrayList, this.dataSet1.Tables["TOTAL"]); tab0.TableName = "TOTAL"; this.dataSet1.Tables["TOTAL"].Merge(tab0); } if (aList[1] != null)//单一元素 { this.dataSet1.Tables["SCHEM"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[1] as ArrayList, this.dataSet1.Tables["SCHEM"]); tab0.TableName = "SCHEM"; this.dataSet1.Tables["SCHEM"].Merge(tab0); } if (aList[2] != null)//复合元素 { this.dataSet1.Tables["CCHEM"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[2] as ArrayList, this.dataSet1.Tables["CCHEM"]); tab0.TableName = "CCHEM"; this.dataSet1.Tables["CCHEM"].Merge(tab0); } if (aList[3] != null)//材质项目 { this.dataSet1.Tables["QLTY"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[3] as ArrayList, this.dataSet1.Tables["QLTY"]); tab0.TableName = "QLTY"; this.dataSet1.Tables["QLTY"].Merge(tab0); } if (aList[4] != null)//取样信息 { this.dataSet1.Tables["LOT"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[4] as ArrayList, this.dataSet1.Tables["LOT"]); tab0.TableName = "LOT"; this.dataSet1.Tables["LOT"].Merge(tab0); } if (aList[5] != null)//交付条件 { this.dataSet1.Tables["DEL"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[5] as ArrayList, this.dataSet1.Tables["DEL"]); tab0.TableName = "DEL"; this.dataSet1.Tables["DEL"].Merge(tab0); } if (aList[6] != null)//炼钢规范 { this.dataSet1.Tables["SMS"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[6] as ArrayList, this.dataSet1.Tables["SMS"]); tab0.TableName = "SMS"; this.dataSet1.Tables["SMS"].Merge(tab0); } if (aList[7] != null)//热轧规范 { this.dataSet1.Tables["MILL"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[7] as ArrayList, this.dataSet1.Tables["MILL"]); tab0.TableName = "MILL"; this.dataSet1.Tables["MILL"].Merge(tab0); } if (aList[8] != null)//冷轧规范 { this.dataSet1.Tables["COLD"].Clear(); System.Data.DataTable tab0 = Common.FixDBManager.ConvertToDataTable(aList[8] as ArrayList, this.dataSet1.Tables["COLD"]); tab0.TableName = "COLD"; this.dataSet1.Tables["COLD"].Merge(tab0); } } else { return; } //ccp.SourceDataTable = this.dataSet2.Tables[0]; //this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); //for (int i = 0; i < this.dataSet1.Tables[0].Columns.Count; i++ ) //{ if (this.dataSet1.Tables["TOTAL"].Rows.Count > 0) { this.textBoxProgCD.Text = this.dataSet1.Tables[0].Rows[0]["ORD_PROG_CD"].ToString();//订单进程 this.textBoxPROD_LINE.Text = this.dataSet1.Tables[0].Rows[0]["PROD_LINE"].ToString();//产线 this.textBox1ORD_DEVLMT_DATE.Text = this.dataSet1.Tables[0].Rows[0]["ORD_DEVLMT_DATE"].ToString();//交货期 this.textBox1DSN_CMT_DATE.Text = this.dataSet1.Tables[0].Rows[0]["DSN_CMT_DATE"].ToString();//品质设计日期 this.textBoxSMS_STD_NO.Text = this.dataSet1.Tables[0].Rows[0]["SMS_STD_NO"].ToString();//炼钢规范 this.textBoxMILL_STD_NO.Text = this.dataSet1.Tables[0].Rows[0]["MILL_STD_NO"].ToString();//热轧规范 this.textBoxCOLD_STD_NO.Text = this.dataSet1.Tables[0].Rows[0]["COLD_STD_NO"].ToString();//冷轧规范 this.textBoxCUST_SPEC_NO.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO"].ToString();//客户参数号 this.textBoxCUST_SPEC_NO_INGR.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO_INGR"].ToString();//成分客户参数号 this.textBoxCUST_SPEC_NO_QLTY.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO_QLTY"].ToString();//材质客户参数号 this.textBoxCUST_SPEC_NO_DEL.Text = this.dataSet1.Tables[0].Rows[0]["CUST_SPEC_NO_DEL"].ToString();//交付客户参数号 this.textBoxCUST_NM.Text = this.dataSet1.Tables[0].Rows[0]["CUST_NM"].ToString();//客户名 this.textBoxORD_THK.Text = this.dataSet1.Tables[0].Rows[0]["ORD_THK"].ToString();//热轧厚度 this.textBoxORD_WTH.Text = this.dataSet1.Tables[0].Rows[0]["ORD_WTH"].ToString();//热轧宽度 this.textBoxPRDNM_CD.Text = this.dataSet1.Tables[0].Rows[0]["PRDNM_CD"].ToString();//热轧交货状态 this.textBoxORD_USE_TP.Text = this.dataSet1.Tables[0].Rows[0]["ORD_USE_TP"].ToString();//热卷订单用途 this.textBoxSPEC_ABBSYM.Text = this.dataSet1.Tables[0].Rows[0]["SPEC_ABBSYM"].ToString();//标准号 this.textBoxSPEC_STL_GRD.Text = this.dataSet1.Tables[0].Rows[0]["SPEC_STL_GRD"].ToString();//标准牌号 this.textBoxC_ORD_THK.Text = this.dataSet1.Tables[0].Rows[0]["C_ORD_THK"].ToString();//冷卷厚度 this.textBoxC_ORD_WTH.Text = this.dataSet1.Tables[0].Rows[0]["C_ORD_WTH"].ToString();//冷卷宽度 this.textBoxC_PRDNM_CD.Text = this.dataSet1.Tables[0].Rows[0]["C_PRDNM_CD"].ToString();//冷卷交货状态 this.textBoxC_ORD_USE_TP.Text = this.dataSet1.Tables[0].Rows[0]["C_ORD_USE_TP"].ToString();//冷卷交货状态 this.textBoxC_SPEC_ABBSYM.Text = this.dataSet1.Tables[0].Rows[0]["C_SPEC_ABBSYM"].ToString();//冷卷订单用途 this.textBoxC_SPEC_STL_GRD.Text = this.dataSet1.Tables[0].Rows[0]["C_SPEC_STL_GRD"].ToString();//冷卷标准牌号 this.textBoxEDGE_PROC_YN.Text = this.dataSet1.Tables[0].Rows[0]["EDGE_PROC_YN"].ToString();//是否切边 this.textBoxPAKMTH_TP.Text = this.dataSet1.Tables[0].Rows[0]["PAKMTH_TP"].ToString();//包装方式 this.textBoxWgtMin.Text = this.dataSet1.Tables[0].Rows[0]["PROD_WGT_MIN"].ToString();//最小重量 this.textBoxWgtMax.Text = this.dataSet1.Tables[0].Rows[0]["PROD_WGT_MAX"].ToString();//最大重量 this.textBoxExp.Text = this.dataSet1.Tables[0].Rows[0]["C_EXTSHAPE_REQ"].ToString();//外观等级 this.textBoxLincense.Text = this.dataSet1.Tables[0].Rows[0]["LICENSE_NO"].ToString();//许可证号 this.textBoxSize.Text = this.dataSet1.Tables[0].Rows[0]["SUAN_SIZE"].ToString();//酸轧控制公差带 textBoxtuy this.textBoxtuy.Text = this.dataSet1.Tables[0].Rows[0]["OIL_DEF"].ToString();//涂油代码 } } catch (System.Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } //} } public string OrderNO { set { this.textBoORD.Text = value; } } public string OrderSEQ { set { textBoxSEQ.Text = value; DoQuery(); } } private void textBoxSEQ_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Enter) { this.DoQuery(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } private void textBoORD_KeyDown(object sender, KeyEventArgs e) { try { if (e.KeyCode == Keys.Tab) { this.textBoxSEQ.Focus(); } } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } } }