| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290 |
- 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;
- }
- }
- }
|