using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using CoreFS.CA06; using System.Windows.Forms; using Infragistics.Win.UltraWinGrid; using System.Collections; using com.steering.mes.zgmil.entity; using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.ZGMil.Entity; using Core.Mes.Client.Comm.Control; namespace Core.StlMes.Client.ZGMil.Result { public partial class FrmHotCheck : FrmBase { //private OpeBase ob; public OpeBase Ob { get { return ob; } set { ob = value; } } public FrmHotCheck(DataTable dt, OpeBase _Ob) { InitializeComponent(); Ob = _Ob; DataRow row1 = dt.Rows[0]; LH_TEXT.Text = row1[3].ToString(); BH_TEXT.Text = ""; BZ_TEXT.Text = ""; PZ_TEXT.Text = row1[18].ToString(); GZ_TEXT.Text = row1[25].ToString(); GJ_TEXT.Text = row1[27].ToString(); GG_TEXT.Text = row1[19].ToString(); JY_TEXT.Text = ""; textBox11.Text = ""; Infragistics.Win.ValueList valulist = new Infragistics.Win.ValueList();//复探原因 valulist.ValueListItems.Add("管端"); valulist.ValueListItems.Add("管体"); valulist.ValueListItems.Add("管尾"); foreach (UltraGridRow ugr in ultraGrid1.Rows) { ugr.Cells["pipe_location"].ValueList = valulist; } DataTable dt1 = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.CheckHotCheckDetail", new Object[] { LH_TEXT.Text }, this.ob); if (dt1.Rows.Count > 0) { GridHelper.CopyDataToDatatable(ref dt1, ref this.dataTable1, true); //foreach (UltraGridRow ugr in ultraGrid1.Rows) //{ // if (ultraGrid1.ActiveRow.Cells["pipe_location"].Value.ToString() == "0") // { // ultraGrid1.ActiveRow.Cells["pipe_location"].Value = "管头"; // } // if (ultraGrid1.ActiveRow.Cells["pipe_location"].Value.ToString() == "1") // { // ultraGrid1.ActiveRow.Cells["pipe_location"].Value = "管体"; // } // if (ultraGrid1.ActiveRow.Cells["pipe_location"].Value.ToString() == "2") // { // ultraGrid1.ActiveRow.Cells["pipe_location"].Value = "管尾"; // } //} } else { this.dataTable1.Rows.Add(new object[] { row1[3].ToString(), "管头" }); this.dataTable1.Rows.Add(new object[] { row1[3].ToString(), "管体" }); this.dataTable1.Rows.Add(new object[] { row1[3].ToString(), "管尾" }); } } private void ultraButton1_Click(object sender, EventArgs e) { string heatno = this.LH_TEXT.Text.ToString().Trim(); string flag = "0"; MilHotCheckEntity Hot_check = new MilHotCheckEntity(); Hot_check.JudgeStoveNo = LH_TEXT.Text; Hot_check.Steel = GJ_TEXT.Text; Hot_check.SeralNum = BH_TEXT.Text; Hot_check.Kidn = PZ_TEXT.Text; Hot_check.Grade = GZ_TEXT.Text; Hot_check.Inspector = JY_TEXT.Text; Hot_check.Standard = PZ_TEXT.Text; Hot_check.PipeSize = GG_TEXT.Text; Hot_check.Remark = textBox11.Text; MilHotCheckDetailEntity Hot_check_detail0 = new MilHotCheckDetailEntity(); MilHotCheckDetailEntity Hot_check_detail1 = new MilHotCheckDetailEntity(); MilHotCheckDetailEntity Hot_check_detail2 = new MilHotCheckDetailEntity(); Hot_check_detail0=NativeMethod.GetUltraGridToEntity(this.ultraGrid1,Hot_check_detail0,0); Hot_check_detail1=NativeMethod.GetUltraGridToEntity(this.ultraGrid1,Hot_check_detail1,1); Hot_check_detail2=NativeMethod.GetUltraGridToEntity(this.ultraGrid1,Hot_check_detail2,2); Hot_check_detail0.PipeLocation = "0"; Hot_check_detail1.PipeLocation = "1"; Hot_check_detail2.PipeLocation = "2"; DataTable dt = ServerHelper.GetData("com.steering.mes.zgmil.coup.FrmHotCheck.CheckHotCheck", new object[] { heatno }, this.ob); if (dt.Rows.Count > 0) { flag="1"; } int count =ServerHelper.SetData("com.steering.mes.zgmil.coup.FrmHotCheck.UpdateMilHot",new object[] {Hot_check,Hot_check_detail0,Hot_check_detail1,Hot_check_detail2,flag},this.ob); //ServerHelper.SetData("com.steering.mes.fpr[]ecall.corefprecall.tb", new object[] { list }, ob); //MessageUtil.ShowTips("提交成功!"); } } }