FrmPlineCode.cs 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. using Core.Mes.Client.Comm.Server;
  2. using Core.Mes.Client.Comm.Tool;
  3. using CoreFS.CA06;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.ComponentModel;
  7. using System.Data;
  8. using System.Drawing;
  9. using System.Linq;
  10. using System.Text;
  11. using System.Windows.Forms;
  12. namespace Core.StlMes.Client.YdmPipeManage
  13. {
  14. public partial class FrmPlineCode : FrmBase
  15. {
  16. OpeBase _ob;
  17. string _custom;
  18. public FrmPlineCode(OpeBase ob,string custom)
  19. {
  20. this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
  21. InitializeComponent();
  22. _ob = ob;
  23. _custom = custom;
  24. }
  25. public string plineCode = "";
  26. public string plineName = "";
  27. public string isOk = "";
  28. private void FrmPlineCode_Load(object sender, EventArgs e)
  29. {
  30. initPlineCode(_custom);
  31. }
  32. /// <summary>
  33. /// 加载产线
  34. /// </summary>
  35. private void initPlineCode(string _custom)
  36. {
  37. DataTable dt = ServerHelper.GetData("com.steering.pss.ydm.pipemanage.FrmFrimRedChong.doQueryPline", new object[] { _custom }, this._ob);
  38. if (dt.Rows.Count > 0)
  39. {
  40. ultraComboEditor2.DataSource = dt;
  41. ultraComboEditor2.DisplayMember = "PLINE_NAME";
  42. ultraComboEditor2.ValueMember = "PLINE_CODE";
  43. }
  44. }
  45. private void button1_Click(object sender, EventArgs e)
  46. {
  47. plineCode = this.ultraComboEditor2.Value.ToString2();
  48. plineName = this.ultraComboEditor2.Text.ToString2();
  49. if (plineCode == "")
  50. {
  51. MessageUtil.ShowTips("确认收料时请选择对应的产线!");
  52. return;
  53. }
  54. isOk = "1";
  55. this.Close();
  56. }
  57. }
  58. }