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 Infragistics.Win; namespace Core.LZMes.Client.QCM.ChildWindows { public partial class QCM0307MEMO : FrmBase { public QCM0307MEMO() { InitializeComponent(); } private void DoQuery(string pline_code) { //查询 try { this.dataSet1.Clear(); string prod_line = ""; if (pline_code == "卷板") { prod_line = "JB1"; } else if (pline_code == "中厚板") { prod_line = "ZHB"; } else if (pline_code == "线棒") { prod_line = "XB1"; } CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "QCM.QCM01.QCM0106.QueryDefect"; ccp.MethodName = "QueryMemo"; ccp.ServerParams = new object[] { prod_line }; ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteQueryToDataTable(ccp, CoreInvokeType.Internal); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } } /*private void Add() { try { string prod_line = ""; if (this.comboBox1.Text.ToString() == "热连轧") { prod_line = "RZ1"; } else if (this.comboBox1.Text.ToString() == "连退") { prod_line = "LT1"; } else if (this.comboBox1.Text.ToString() == "酸轧") { prod_line = "SZ1"; } else if (this.comboBox1.Text.ToString() == "中板线") { prod_line = "ZB1"; } else if (this.comboBox1.Text.ToString() == "厚板线") { prod_line = "HB1"; } else if (this.comboBox1.Text.ToString() == "高棒") { prod_line = "GX1"; } else if (this.comboBox1.Text.ToString() == "高线") { prod_line = "GX2"; } else if (this.comboBox1.Text.ToString() == "棒二") { prod_line = "BC2"; } CoreClientParam ccp = new CoreClientParam(); ccp.ServerName = "QCM.QCM01.QCM0106.QueryDefect"; ccp.MethodName = "AddMemo"; ccp.ServerParams = new object[] { prod_line, this.textBox3.Text.ToString() }; //ccp.SourceDataTable = this.dataSet1.Tables[0]; this.ExecuteNonQuery(ccp, CoreInvokeType.Internal); MessageBox.Show("处理备注添加成功", "提示"); this.DoQuery(); } catch (Exception ex) { System.Diagnostics.Debug.WriteLine(ex.ToString()); } }*/ public string pline_code = ""; public string memo = ""; private void button1_Click(object sender, EventArgs e) { foreach (UltraGridRow ugr in this.ultraGrid1.Rows) { if (ugr.Cells["CHK"].Text.ToLower() == "true") { if (memo == "") { memo = ugr.Cells["MEMO"].Value.ToString(); } else if (memo != "") { memo +=";"+ ugr.Cells["MEMO"].Value.ToString(); } } } this.DialogResult = DialogResult.OK; } private void button2_Click(object sender, EventArgs e) { this.Close(); } private void QCM0307MEMO_Load(object sender, EventArgs e) { this.DoQuery(pline_code); } private void QCM0307MEMO_Load_1(object sender, EventArgs e) { this.DoQuery(pline_code); } } }