frmStation.cs 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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.CA03;
  10. using CoreFS.CA04;
  11. using CoreFS.CA06;
  12. using System.Collections;
  13. using Infragistics.Win.UltraWinGrid;
  14. using Core.Mes.Client.Comm.Server;
  15. using Core.Mes.Client.Comm.Control;
  16. using Core.Mes.Client.Comm.Tool;
  17. namespace Core.StlMes.Client.SaleOrder
  18. {
  19. public partial class frmStation : FrmBase
  20. {
  21. public frmStation()
  22. {
  23. InitializeComponent();
  24. }
  25. public frmStation(OpeBase ob)
  26. {
  27. InitializeComponent();
  28. this.ob = ob;
  29. }
  30. private void frmStation_Load(object sender, EventArgs e)
  31. {
  32. //绑定到站数据源
  33. doQuery();
  34. }
  35. /// <summary>
  36. /// 获取到站信息
  37. /// </summary>
  38. private void doQuery()
  39. {
  40. DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.CoreTransitLine.GetStation", null, this.ob);
  41. GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true);
  42. //列自适应
  43. GridHelper.RefreshAndAutoSizeExceptRows(ultraGrid1, new UltraGridColumn[] {
  44. });
  45. }
  46. /// <summary>
  47. /// 委托方法
  48. /// </summary>
  49. /// <param name="ROrdLen"></param>
  50. public delegate void GetStationDescHander(string stationDesc);
  51. public event GetStationDescHander GetStationDesc;
  52. /// <summary>
  53. /// 将当前选中行的描述信息,返回主界面。
  54. /// </summary>
  55. /// <param name="sender"></param>
  56. /// <param name="e"></param>
  57. private void button1_Click(object sender, EventArgs e)
  58. {
  59. if (ultraGrid1.ActiveRow == null)
  60. {
  61. MessageBox.Show("请先选择需要返回的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
  62. return;
  63. }
  64. string stationDesc = ultraGrid1.ActiveRow.Cells["STATION_NM"].Value.ToString();
  65. GetStationDesc(stationDesc);
  66. this.Close();
  67. }
  68. }
  69. }