| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154 |
- 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 Infragistics.Win.UltraWinGrid;
- namespace Core.LZMes.Client.UIB
- {
- public partial class UIB030150 : FrmBase
- {
- public UIB030150()
- {
- 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("UIB030150_03.SELECT");
- }
- else
- {
- al.Add("UIB030150_01.SELECT");
- }
- al.Add(this.ultraDateTimeEditor1.DateTime.ToString("yyyyMMdd")+"000000");
- al.Add(this.ultraDateTimeEditor2.DateTime.ToString("yyyyMMdd")+"999999");
- 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);
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (ugr.Cells["MATLQLTY_DEC_GRD"].Text == "2")
- ugr.RowSelectorAppearance.BackColor = Color.Red;
- }
- }
- catch (Exception ex)
- {
- }
- }
- public void DoSave()
- {
- try
- {
- if (MessageBox.Show("确认取消判定?", "提示", MessageBoxButtons.OKCancel) == DialogResult.Cancel)
- return;
- foreach (UltraGridRow ugr in this.ultraGrid1.Rows)
- {
- if (Convert.ToBoolean(ugr.Cells["CHK"].Value))
- {
- CoreClientParam ccp = new CoreClientParam();
- Hashtable ht = new Hashtable();
- ht.Add("i1", ugr.Cells["SMP_NO"].Text);
- ht.Add("i2", ugr.Cells["SMP_CUT_LOC"].Text);
- ht.Add("i3", this.UserInfo.GetUserName());
- ht.Add("o4", "");
- ccp.ServerName = "UIB.COM.ComDBProcedure";
- ccp.MethodName = "doXmlProcedure";
- if (this.comboBox3.Text == "酸洗")
- {
- ccp.ServerParams = new object[] { "UIB030150_02.CALL", ht };
- }
- else
- {
- ccp.ServerParams = new object[] { "UIB030150_01.CALL", ht };
- }
- this.ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- }
- }
- this.DoQuery();
- }
- catch (Exception ex)
- {
- }
- }
- private void ultraGrid1_AfterRowActivate(object sender, EventArgs e)
- {
- try
- {
- if (this.ultraGrid1.ActiveRow == null) return;
- //if(this.ultraGrid1.ActiveRow.Cells[]);
- //if (this.ultraGrid1.ActiveCell.Column.Key == "CHK")
- // return;
- ArrayList al = new ArrayList();
- if (this.comboBox3.Text == "酸洗")
- {
- al.Add("UIB030150_04.SELECT");
- }
- else
- {
- al.Add("UIB030150_02.SELECT");
- }
- al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["COIL_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_NO"].Text);
- al.Add(this.ultraGrid1.ActiveRow.Cells["SMP_CUT_LOC"].Text);
- 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);
- foreach (UltraGridRow ugr in this.ultraGrid2.Rows)
- {
- if (ugr.Cells["QLTY_DCS_RST"].Text == "2")
- ugr.RowSelectorAppearance.BackColor = Color.Red;
- }
- }
- catch (Exception ex)
- {
- }
- }
- private void UIB030150_Load(object sender, EventArgs e)
- {
- this.comboBox3.SelectedIndex = 0;
- }
- }
- }
|