ucInIron.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. using System;
  2. using System.Drawing;
  3. using System.Windows.Forms;
  4. using Core.LgMes.Client.Comm;
  5. namespace Core.LgMes.Client.LgJobMgt
  6. {
  7. public partial class ucInIron : UserControl
  8. {
  9. public ucInIron()
  10. {
  11. InitializeComponent();
  12. CStaticMethod.SetUltraGridStyle(ultraGrid1, 2); //设置样式
  13. }
  14. public Image m_imageDefault = null;
  15. private void ucInIron_Load(object sender, EventArgs e)
  16. {
  17. ultraDataSource1.Rows.Add(new object[] { "", "", "", null, "", "", "", "", "", "", "", "", "" });
  18. }
  19. private void ultraGrid1_CellChange(object sender, Infragistics.Win.UltraWinGrid.CellEventArgs e)
  20. {
  21. if(e.Cell.Column.Key=="LdMaoWeight")
  22. {
  23. try
  24. {
  25. if (e.Cell.Text.ToString().Length > 0)
  26. {
  27. if (Convert.ToDouble(e.Cell.Text) > 250)
  28. {
  29. MessageBox.Show("铁水毛重不能大于( 250Kg ),重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  30. e.Cell.Value = "";
  31. }
  32. }
  33. }
  34. catch
  35. {
  36. MessageBox.Show("输入数据格式不正确,重新输入!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
  37. }
  38. }
  39. }
  40. }
  41. }