ucResPlanCcm.cs 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. using System;
  2. using System.Collections;
  3. using System.Windows.Forms;
  4. using Infragistics.Win;
  5. using Infragistics.Win.UltraWinGrid;
  6. using CoreFS.CA06;
  7. namespace Core.StlMes.Client.LgCommon
  8. {
  9. public partial class ucResPlanCcm : ucResBase
  10. {
  11. public ucResPlanCcm()
  12. {
  13. InitializeComponent();
  14. }
  15. protected override void ultraGrid1_ClickCellButton(object sender, CellEventArgs e)
  16. {
  17. base.ultraGrid1_ClickCellButton(sender, e);
  18. try
  19. {
  20. string strKey = e.Cell.Column.Key.ToUpper();
  21. if (strKey.Equals("CCMSTOVENO") || strKey.Equals("STDNO"))
  22. {
  23. frmHeatNoEditor frm = new frmHeatNoEditor();
  24. frm.InputText = Convert.ToString(e.Cell.Text);
  25. frm.Location = ClsControlPack.GetChildWindowLocation(frm.Size);
  26. if (frm.ShowDialog() == DialogResult.OK)
  27. {
  28. e.Cell.Value = frm.InputText;
  29. ultraGrid1.UpdateData();
  30. }
  31. }
  32. else if (strKey.Equals("MOULDNO") || strKey.Equals("MOULDSTOVENUM") ||
  33. strKey.Equals("MOULDNUMID") || strKey.Equals("POTNO") || strKey.Equals("POTAGE") || strKey.Equals("HEAT_SEQ"))
  34. {
  35. frmInputDecimal frm = new frmInputDecimal(Convert.ToString(e.Cell.Text));
  36. frm.Location = ClsControlPack.GetChildWindowLocation(frm.Size);
  37. if (frm.ShowDialog() == DialogResult.OK)
  38. {
  39. if (!frm.ValueChanged) return;
  40. e.Cell.Value = frm.Value;
  41. ultraGrid1.UpdateData();
  42. }
  43. }
  44. }
  45. catch { }
  46. }
  47. }
  48. }