FrmBcOnPassage.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using Core.Mes.Client.Comm.Tool;
  2. using Core.StlMes.Client.YdmBcPipeManage.Entity;
  3. using CoreFS.CA06;
  4. using System;
  5. using System.Collections;
  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.YdmBcPipeManage
  14. {
  15. public partial class FrmBcOnPassage : FrmBase
  16. {
  17. public FrmBcOnPassage()
  18. {
  19. this.IsLoadUserView = true;
  20. InitializeComponent();
  21. }
  22. private void FrmBcOnPassage_Load(object sender, EventArgs e)
  23. {
  24. EntityHelper.ShowGridCaption<YdmBcOutlistEntity>(ultraGrid2.DisplayLayout.Bands[0]);
  25. }
  26. /// <summary>
  27. /// 重写基类方法
  28. /// </summary>
  29. /// <param name="sender"></param>
  30. /// <param name="ToolbarKey"></param>
  31. public override void ToolBar_Click(object sender, string ToolbarKey)
  32. {
  33. switch (ToolbarKey)
  34. {
  35. case "Query":
  36. doQueryOnPassage();
  37. break;
  38. case "Close":
  39. this.Close();
  40. break;
  41. }
  42. }
  43. /// <summary>
  44. /// 查询
  45. /// </summary>
  46. private void doQueryOnPassage()
  47. {
  48. string judgeNo = "";
  49. if (chkJudgeNo.Checked && this.txtJudgeNo.Text.Trim() != "")
  50. {
  51. judgeNo = this.txtJudgeNo.Text.Trim();
  52. }
  53. ArrayList list = new ArrayList();
  54. list.Add(judgeNo);
  55. List<YdmBcOutlistEntity> listSource = EntityHelper.GetData<YdmBcOutlistEntity>(
  56. "com.steering.ydm.bc.FrmBcOnPassage.doQueryOnPassage", new object[] { list }, this.ob);
  57. ydmBcOutlistEntityBindingSource.DataSource = listSource;
  58. }
  59. private void chkJudgeNo_CheckedChanged(object sender, EventArgs e)
  60. {
  61. this.txtJudgeNo.Enabled = this.chkJudgeNo.Checked;
  62. }
  63. private void txtJudgeNo_KeyDown(object sender, KeyEventArgs e)
  64. {
  65. if (e.KeyValue == 13)
  66. {
  67. doQueryOnPassage();
  68. }
  69. }
  70. }
  71. }