FrmInformation.cs 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Windows.Forms;
  9. using CoreFS.CA06;
  10. using Core.Mes.Client.Comm.Tool;
  11. using Core.StlMes.Client.Mcp.Entity;
  12. using System.Collections;
  13. using Core.Mes.Client.Comm.Control;
  14. using Core.Mes.Client.Comm.Server;
  15. using Core.StlMes.Client.Mcp.CollarMaterial;
  16. using Core.StlMes.Client.Mcp.Control;
  17. namespace Core.StlMes.Client.Mcp.Coupling
  18. {
  19. public partial class FrmInformation : FrmBase
  20. {
  21. public FrmInformation()
  22. {
  23. InitializeComponent();
  24. this.IsLoadUserView = true;
  25. }
  26. private void FrmInformation_Load(object sender, EventArgs e)
  27. {
  28. EntityHelper.ShowGridCaption<CouplingComInfoEntity>(ultraGrid1.DisplayLayout.Bands[0]);
  29. //获取切管工序
  30. DataTable dt2 = ServerHelper.GetData("com.steering.mes.mcp.coup.FrmInformation.getQueryGX", null, this.ob);
  31. if (dt2.Rows.Count>0)
  32. {
  33. Object[] obj = new Object[] { "", "" };
  34. DataRow dr = dt2.NewRow();
  35. dr.ItemArray = obj;
  36. dt2.Rows.InsertAt(dr, 0);
  37. }
  38. cmbCname.DataSource = dt2;
  39. cmbCname.DisplayMember = "BASENAME";
  40. cmbCname.ValueMember = "BASECODE";
  41. YdmBaseClass.SetComboItemHeight(cmbCname);
  42. }
  43. public override void ToolBar_Click(object sender, string ToolbarKey)
  44. {
  45. switch (ToolbarKey)
  46. {
  47. case "DoQuery":
  48. DoQuery();
  49. break;
  50. //case "DoBeside"://结炉
  51. // DoBeside();
  52. // break;
  53. //case "UndoBeside"://撤销结炉
  54. // UndoBeside();
  55. // break;
  56. case "DoClose":
  57. this.Close();
  58. break;
  59. }
  60. }
  61. /// <summary>
  62. /// 查询
  63. /// </summary>
  64. private void DoQuery()
  65. {
  66. string judgeStoveNo = this.txtJudgeStoveNO.Text.ToString();
  67. string batchNo = this.txtBatchNO.Text;
  68. string zYgNo = this.txtLotNo.Text.Trim();
  69. string gx = "";
  70. if (cmbCname.Text.ToString().Equals(""))
  71. {
  72. gx = "";
  73. }
  74. else
  75. {
  76. gx = cmbCname.Value.ToString();
  77. }
  78. ArrayList list = new ArrayList();
  79. list.Add(zYgNo);
  80. list.Add(judgeStoveNo);
  81. list.Add(batchNo);
  82. list.Add(gx);
  83. List<CouplingComInfoEntity> listSource = EntityHelper.GetData<CouplingComInfoEntity>("com.steering.mes.mcp.coup.FrmInformation.doQueryInfoResult", new object[] { list }, this.ob);
  84. CouplingComInfoEntity.DataSource = listSource;
  85. GridHelper.RefreshAndAutoSize(ultraGrid1);
  86. }
  87. }
  88. }