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 Infragistics.Win.UltraWinGrid; using System.Collections; using System.Diagnostics; namespace Core.LZMes.Client.UIB { public partial class UIB030250 : FrmBase { public UIB030250() { InitializeComponent(); } public override void ToolBar_Click(object sender, string ToolbarKey) { switch (ToolbarKey) { case "Query": this.DoQuery(); break; case "Save": this.DoSave(); break; } } public void DoQuery() { try { ArrayList al = new ArrayList(); if (this.comboBox3.Text == "连退") { al.Add("UIB030230_YC.SELECT"); } else { al.Add("UIB030240_YC.SELECT"); } al.Add(this.textBox3_COILNO.Text.Trim()); this.dataSet1.Tables[0].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { al }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } catch (Exception ex) { } } public void DoSave() { try { string mesge = ""; if (this.ultraTabControl1.Tabs[0].Selected)//标准牌号改判 { mesge = "确定按牌号对该卷进行改判操作吗?改判后标准牌号等信息将被替换!"; } else { mesge = "确定按选择合同订单要求对该卷进行改判操作吗?"; } if (MessageBox.Show(mesge, "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; //改判 if (this.ultraGrid1.ActiveRow == null) return; CoreClientParam ccp = new CoreClientParam(); Hashtable ht = new Hashtable(); if (this.ultraTabControl1.Tabs[0].Selected)//标准牌号改判 { if (this.ultraGrid4.ActiveRow == null) return; ht.Add("i1", this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text); ht.Add("i2", this.ultraGrid4.ActiveRow.Cells["PRDNM_CD"].Text); ht.Add("i3", this.ultraGrid4.ActiveRow.Cells["SPEC_ABBSYM"].Text); ht.Add("i4", this.ultraGrid4.ActiveRow.Cells["SPEC_STL_GRD"].Text); ht.Add("i5", this.ultraGrid4.ActiveRow.Cells["ORD_USE_TP"].Text); ht.Add("i6", this.ultraGrid4.ActiveRow.Cells["THK_MIN"].Text); ht.Add("i7", this.ultraGrid4.ActiveRow.Cells["THK_MAX"].Text); ht.Add("i8", this.UserInfo.GetUserName().ToString()); ht.Add("o9", ""); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; if (this.comboBox3.Text == "连退") { ccp.ServerParams = new object[] { "UIB030230_YCCD_GP.CALL", ht }; } else { ccp.ServerParams = new object[] { "UIB030240_YCCD_GP.CALL", ht }; } this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = ccp.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && err[0] != null) { string retInfo = err[0].ToString().Trim(); if (!"YY".Equals(retInfo)) { System.Windows.Forms.MessageBox.Show(retInfo); } } } else if (this.ultraTabControl1.Tabs[1].Selected)//合同订单改判 { if (this.ultraGrid3.ActiveRow == null) return; ht.Add("i1", this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text); ht.Add("i2", this.ultraGrid3.ActiveRow.Cells["PRODNM_CD"].Text); ht.Add("i3", this.ultraGrid3.ActiveRow.Cells["C_SPEC_ABBSYM"].Text); ht.Add("i4", this.ultraGrid3.ActiveRow.Cells["C_SPEC_STL_GRD"].Text); ht.Add("i5", this.ultraGrid3.ActiveRow.Cells["ORD_USEAGE_CD"].Text); ht.Add("i6", ""); ht.Add("i7", ""); ht.Add("i8", this.ultraGrid3.ActiveRow.Cells["ORD_NO"].Text); ht.Add("i9", this.ultraGrid3.ActiveRow.Cells["ORD_SEQ"].Text); ht.Add("i10", "DD"); //表示按订单改判;PH为按牌号改判 ht.Add("i11", this.UserInfo.GetUserName().ToString()); ht.Add("o12", ""); ccp.ServerName = "UIB.COM.ComDBProcedure"; ccp.MethodName = "doXmlProcedure"; if (this.comboBox3.Text == "连退") { ccp.ServerParams = new object[] { "UIB030230_YCCD_GP_ORD.CALL", ht }; } else { ccp.ServerParams = new object[] { "UIB030240_YCCD_GP_ORD.CALL", ht }; } this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); System.Collections.ArrayList err = ccp.ReturnObject as System.Collections.ArrayList; if (err != null && err.Count > 0 && err[0] != null) { string retInfo = err[0].ToString().Trim(); if (!"YY".Equals(retInfo)) { System.Windows.Forms.MessageBox.Show(retInfo); } } } this.DoQuery(); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } } private void ultraGrid1_AfterRowActivate(object sender, EventArgs e) { try { if (this.ultraGrid1.ActiveRow == null) return; ArrayList al = new ArrayList(); if (this.ultraTabControl1.Tabs[0].Selected)//查询标准牌号信息 { al.Add("UIB030230_02.SELECT"); al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text); al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text); this.dataSet3.Tables[0].Clear(); this.dataSet2.Tables[0].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { al }; ccp.SourceDataTable = this.dataSet2.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } else if (this.ultraTabControl1.Tabs[1].Selected && this.dataSet2.Tables[1].Rows.Count < 1)//查询合同订单信息 { al.Add("UIB030230_ORD.select"); al.Add(this.textBox1_ordNo.Text.Trim()); this.dataSet3.Tables[0].Clear(); this.dataSet2.Tables[1].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { al }; ccp.SourceDataTable = this.dataSet2.Tables[1]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } } catch (Exception ex) { } } //获取标准对应的材质信息 private void ultraGrid4_AfterRowActivate(object sender, EventArgs e) { try { if (this.ultraGrid1.ActiveRow == null) return; if (this.ultraGrid4.ActiveRow == null) return; ArrayList al = new ArrayList(); al.Add("UIB030230_03.SELECT"); al.Add(this.ultraGrid4.ActiveRow.Cells["PRDNM_CD"].Text); al.Add(this.ultraGrid4.ActiveRow.Cells["SPEC_ABBSYM"].Text); al.Add(this.ultraGrid4.ActiveRow.Cells["SPEC_STL_GRD"].Text); al.Add(this.ultraGrid4.ActiveRow.Cells["ORD_USE_TP"].Text); al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text); al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_THK"].Text); this.dataSet3.Tables[0].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { al }; ccp.SourceDataTable = this.dataSet3.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } catch (Exception ex) { } } private void ultraGrid3_AfterRowActivate(object sender, EventArgs e) { try { if (this.ultraGrid1.ActiveRow == null) return; if (this.ultraGrid3.ActiveRow == null) return; ArrayList al = new ArrayList(); al.Add("UIB030230_ord_03.SELECT"); al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_NO"].Text); al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_SEQ"].Text); al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_NO"].Text); al.Add(this.ultraGrid3.ActiveRow.Cells["ORD_SEQ"].Text); this.dataSet3.Tables[0].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { al }; ccp.SourceDataTable = this.dataSet3.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } catch (Exception ex) { } } private void ultraButton1_Click(object sender, EventArgs e) { try { if (!this.ultraTabControl1.Tabs[1].Selected)//查询合同订单信息 { this.ultraTabControl1.SelectedTab = this.ultraTabControl1.Tabs[1]; } ArrayList al = new ArrayList(); al.Add("UIB030230_ORD.select"); al.Add(this.textBox1_ordNo.Text.Trim()); this.dataSet3.Tables[0].Clear(); this.dataSet2.Tables[1].Clear(); CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "UIB.COM.ComDBQuery"; ccp.MethodName = "doSimpleQuery"; ccp.ServerParams = new object[] { al }; ccp.SourceDataTable = this.dataSet2.Tables[1]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } catch (Exception ex) { } } private void UIB030250_Load(object sender, EventArgs e) { this.comboBox3.SelectedIndex = 0; } } }