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 Core.Mes.Client.Comm.Tool; using Core.StlMes.Client.YdmBcPipeManage.Entity; using CoreFS.CA06; namespace Core.StlMes.Client.YdmBcPipeManage.Demand { public partial class frmDemandSetting : FrmBase { public frmDemandSetting(OpeBase _ob) { InitializeComponent(); EntityHelper.ShowGridCaption(ugStation.DisplayLayout.Bands[0]); all = EntityHelper.GetData( "com.steering.Demand.sever.TmsDemandServer.doQueryStation", null, _ob); tmsComUnloadingEntityBindingSource.DataSource = all; } private TmsComUnloadingEntity selectRow = null; private List all; public TmsComUnloadingEntity SelectRow { get { return selectRow; } set { selectRow = value; } } private void ugStation_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e) { selectRow = e.Row.ListObject as TmsComUnloadingEntity;; this.DialogResult = DialogResult.OK; } private void txtQuery_KeyUp(object sender, KeyEventArgs e) { if(all==null) return; tmsComUnloadingEntityBindingSource.DataSource = string.IsNullOrWhiteSpace(txtQuery.Text.Trim())?all: all.Where(p => p.UnloadingDesc.IndexOf(txtQuery.Text.Trim(), StringComparison.Ordinal) >= 0).ToList(); ugStation.UpdateData(); ugStation.Update(); ugStation.Refresh(); } } }