| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.LgResMgt.Mcms.entity;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.LgResMgt.Mcms
- {
- public partial class OrderSelect : FrmBase
- {
- public OrderSelect(OpeBase _ob, List<BuyGpOrderEntity> list )
- {
- InitializeComponent();
- this.ob = _ob;
- if (list == null || !list.Any())
- {
- list = EntityHelper.GetData<BuyGpOrderEntity>(
- "com.steering.Mcms.BlankPredictionServer.doQueryOrder",
- new object[] { },
- ob);
- }
- all = list;
- buyGpOrderEntityBindingSource.DataSource = all;
- EntityHelper.ShowGridCaption<BuyGpOrderEntity>(ugStation.DisplayLayout.Bands[0]);
- }
- private BuyGpOrderEntity selectRow = null;
- private readonly List<BuyGpOrderEntity> all;
- public BuyGpOrderEntity SelectRow
- {
- get { return selectRow; }
- set { selectRow = value; }
- }
- private void ugStation_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- selectRow = e.Row.ListObject as BuyGpOrderEntity;
- this.DialogResult = DialogResult.OK;
- }
- private void txtQuery_KeyUp(object sender, KeyEventArgs e)
- {
- if(all==null) return;
- buyGpOrderEntityBindingSource.DataSource = string.IsNullOrWhiteSpace(txtQuery.Text.Trim()) ? all :
- all.Where(p => p.ProOrderNo.IndexOf(txtQuery.Text.Trim(), StringComparison.Ordinal) >= 0).ToList();
- ugStation.UpdateData();
- ugStation.Update();
- ugStation.Refresh();
- }
- }
- }
|