using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using CoreFS.CA03; using CoreFS.CA04; using CoreFS.CA06; using System.Collections; using Infragistics.Win.UltraWinGrid; using Core.Mes.Client.Comm.Server; using Core.Mes.Client.Comm.Control; using Core.Mes.Client.Comm.Tool; namespace Core.StlMes.Client.SaleOrder { public partial class frmStation : FrmBase { public frmStation() { InitializeComponent(); } public frmStation(OpeBase ob) { InitializeComponent(); this.ob = ob; } private void frmStation_Load(object sender, EventArgs e) { //绑定到站数据源 doQuery(); } /// /// 获取到站信息 /// private void doQuery() { DataTable dt = ServerHelper.GetData("com.steering.pss.sale.order.CoreTransitLine.GetStation", null, this.ob); GridHelper.CopyDataToDatatable(ref dt, ref this.dataTable1, true); //列自适应 GridHelper.RefreshAndAutoSizeExceptRows(ultraGrid1, new UltraGridColumn[] { }); } /// /// 委托方法 /// /// public delegate void GetStationDescHander(string stationDesc); public event GetStationDescHander GetStationDesc; /// /// 将当前选中行的描述信息,返回主界面。 /// /// /// private void button1_Click(object sender, EventArgs e) { if (ultraGrid1.ActiveRow == null) { MessageBox.Show("请先选择需要返回的数据!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } string stationDesc = ultraGrid1.ActiveRow.Cells["STATION_NM"].Value.ToString(); GetStationDesc(stationDesc); this.Close(); } } }