FrmSteelGrade.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. using Core.Mes.Client.Comm.Control;
  2. using Core.Mes.Client.Comm.Server;
  3. using CoreFS.CA06;
  4. using Infragistics.Win.UltraWinGrid;
  5. using System;
  6. using System.Collections.Generic;
  7. using System.ComponentModel;
  8. using System.Data;
  9. using System.Drawing;
  10. using System.Linq;
  11. using System.Text;
  12. using System.Windows.Forms;
  13. namespace Core.StlMes.Client.PlnSaleOrd
  14. {
  15. public partial class FrmSteelGrade : FrmBase
  16. {
  17. private OpeBase ob;
  18. private string gradename = "";
  19. private string outs_billet_fl = "";
  20. /// <summary>
  21. /// 钢种
  22. /// </summary>
  23. public string Gradename
  24. {
  25. get { return gradename; }
  26. set { gradename = value; }
  27. }
  28. private string gradecode = "";
  29. public string Gradecode
  30. {
  31. get { return gradecode; }
  32. set { gradecode = value; }
  33. }
  34. private string cic = "";
  35. /// <summary>
  36. /// 钢种索引码
  37. /// </summary>
  38. public string Cic
  39. {
  40. get { return cic; }
  41. set { cic = value; }
  42. }
  43. public FrmSteelGrade(OpeBase _ob, string _outs_billet_fl)
  44. {
  45. ob = _ob;
  46. outs_billet_fl = _outs_billet_fl;
  47. InitializeComponent();
  48. }
  49. private void FrmSteelGrade_Load(object sender, EventArgs e)
  50. {
  51. DataTable dt = ServerHelper.GetData("com.steering.pss.plnsaleord.GpOptimize.CorePlnZgMStoGp.getQueryGrade1",
  52. new object[] { outs_billet_fl }, ob);
  53. GridHelper.CopyDataToDatatable(dt, this.dataTable1, true);
  54. }
  55. private void ultraGridGrade_Click(object sender, EventArgs e)
  56. {
  57. ultraGridGrade.UpdateData();
  58. UltraGridRow ugr = ultraGridGrade.ActiveRow;
  59. if (ugr == null) return;
  60. string[] groupgz = null;
  61. if (!ugr.Cells["GRADENAME"].Text.Equals(""))
  62. {
  63. groupgz = ugr.Cells["GRADENAME"].Text.ToString().Split(';');
  64. }
  65. string[] groupgzc = null;
  66. if (!ugr.Cells["GRADECODE"].Text.Equals(""))
  67. {
  68. groupgzc = ugr.Cells["GRADECODE"].Text.ToString().Split(';');
  69. }
  70. gradename = groupgz[0];
  71. gradecode = groupgzc[0];
  72. cic = ugr.Cells["STD_IDX"].Text.Trim();
  73. this.DialogResult = DialogResult.OK;
  74. this.Close();
  75. }
  76. private void ultraGridGrade_ClickCell(object sender, ClickCellEventArgs e)
  77. {
  78. ultraGridGrade.UpdateData();
  79. UltraGridRow ugr = ultraGridGrade.ActiveRow;
  80. if (ugr == null) return;
  81. string[] groupgz = null;
  82. if (!ugr.Cells["GRADENAME"].Text.Equals(""))
  83. {
  84. groupgz = ugr.Cells["GRADENAME"].Text.ToString().Split(';');
  85. }
  86. string[] groupgzc = null;
  87. if (!ugr.Cells["GRADECODE"].Text.Equals(""))
  88. {
  89. groupgzc = ugr.Cells["GRADECODE"].Text.ToString().Split(';');
  90. }
  91. gradename = groupgz[0];
  92. gradecode = groupgzc[0];
  93. cic = ugr.Cells["STD_IDX"].Text.Trim();
  94. this.DialogResult = DialogResult.OK;
  95. this.Close();
  96. }
  97. }
  98. }