ucInIron.cs 1.5 KB

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