| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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<TmsComUnloadingEntity>(ugStation.DisplayLayout.Bands[0]);
- all = EntityHelper.GetData<TmsComUnloadingEntity>(
- "com.steering.Demand.sever.TmsDemandServer.doQueryStation", null,
- _ob);
- tmsComUnloadingEntityBindingSource.DataSource = all;
- }
- private TmsComUnloadingEntity selectRow = null;
- private List<TmsComUnloadingEntity> 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();
- }
- }
- }
|