using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Data; using System.Text; using System.Windows.Forms; using System.Collections; namespace Core.LgMes.Client.LgJobMgt { public partial class ucHtInIron : UserControl { public ucHtInIron() { InitializeComponent(); CStaticMethod.SetUltraGridStyle(ultraGrid1, 2); //设置样式 } public Image m_imageDefault = null; private void ucHtInIron_Load(object sender, EventArgs e) { ultraDataSource1.Rows.Add(new object[] { "", "", "", null, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}); } private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e) { if (e.Cell.Column.Key == "LdMaoWeight") { try { if (e.Cell.Text.ToString().Length > 0) { if (Convert.ToDouble(e.Cell.Text) > 250) { MessageBox.Show("铁水毛重不能大于( 250Kg ),重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); e.Cell.Value = ""; } } } catch { MessageBox.Show("输入数据格式不正确,重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); } } } } }