using System; using System.Collections; 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 Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Control; using Core.StlMes.Client.ZGMil; using com.steering.mes.zgmil.entity; using Infragistics.Win.UltraWinGrid; namespace Core.StlMes.Client.ZGMil.ResultConrtrol { public partial class ColHotCheck : UserControl { private Infragistics.Win.UltraWinGrid.UltraGrid _grid = null; public ColHotCheck() { InitializeComponent(); GridHelper.InitCardGrid(SizingDataSource, ultraGrid2); _grid = this.ultraGrid2; } private MilHotCheckResultEntity _hotCheckResult = new MilHotCheckResultEntity(); public MilHotCheckResultEntity Value { get { return _hotCheckResult; } set { if (value != null) { _hotCheckResult = value; UpdateDate(); } } } private bool isCellSelect = false; public bool IsCellSelect { get { return isCellSelect; } set { isCellSelect = value; } } public void UpdateDate() { if (_hotCheckResult != null) { SizingDataSource.Rows[0]["INSPECTOR"] = _hotCheckResult.Inspector; SizingDataSource.Rows[0]["CHECK_DATE"] = _hotCheckResult.CheckDate; SizingDataSource.Rows[0]["CUT_HEAD_P"] = _hotCheckResult.CutHeadP; SizingDataSource.Rows[0]["CUT_TRAIL_P"] = _hotCheckResult.CutTrailP; SizingDataSource.Rows[0]["CUT_ORDER_P"] = _hotCheckResult.CutOrderP; SizingDataSource.Rows[0]["CUT_HEAD"] = _hotCheckResult.CutHead; SizingDataSource.Rows[0]["CUT_TRAIL"] = _hotCheckResult.CutTrail; SizingDataSource.Rows[0]["CUT_ORDER"] = _hotCheckResult.CutOrder; SizingDataSource.Rows[0]["REMARK"] = _hotCheckResult.Remark; SizingDataSource.Rows[0]["PASS_SERIES1"] = _hotCheckResult.PassSeries1; SizingDataSource.Rows[0]["PASS_SERIES2"] = _hotCheckResult.PassSeries2; SizingDataSource.Rows[0]["PASS_SERIES3"] = _hotCheckResult.PassSeries3; SizingDataSource.Rows[0]["PASS_SERIES4"] = _hotCheckResult.PassSeries4; SizingDataSource.Rows[0]["DOUBLE_B1"] = _hotCheckResult.DoubleB1; SizingDataSource.Rows[0]["DOUBLE_B2"] = _hotCheckResult.DoubleB2; SizingDataSource.Rows[0]["DOUBLE_B3"] = _hotCheckResult.DoubleB3; SizingDataSource.Rows[0]["DOUBLE_B4"] = _hotCheckResult.DoubleB4; SizingDataSource.Rows[0]["START_TEMP"] = _hotCheckResult.StartTemp; SizingDataSource.Rows[0]["END_TEMP"] = _hotCheckResult.EndTemp; SizingDataSource.Rows[0]["OUTDIAMETER"] = _hotCheckResult.Outdiameter; SizingDataSource.Rows[0]["WALLTHICK"] = _hotCheckResult.Wallthick; } } private void ultraGrid2_CellChange(object sender, CellEventArgs e) { isCellSelect = true; } private void ultraGrid2_Error(object sender, ErrorEventArgs e) { e.Cancel = true; if (ultraGrid2.ActiveCell.Column.Key == "CHECK_DATE" ) { MessageBox.Show("请输入完整的时间"); } } private void ultraGrid2_KeyPress(object sender, KeyPressEventArgs e) { if (e.KeyChar == (char)13) { //this.SelectNextControl(this.ActiveControl, true, true, true, true); ultraGrid2.PerformAction(UltraGridAction.NextCell); ultraGrid2.PerformAction(UltraGridAction.EnterEditMode); //ultraGrid2.ActiveCell.IsInEditMode = true; } } } }