| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Tool;
- using Core.StlMes.Client.Mcp.Mch.Mcms.entity;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.Mcp.Mch.Mcms
- {
- public partial class NameSelect : FrmBase
- {
- public NameSelect(OpeBase _ob, string name,string text)
- {
- InitializeComponent();
- var dic = new Dictionary<string, object>();
- dic.Add("recordType", name == "OrderName"
- ? new List<string>() {"3"}
- : name == "ShippersName"
- ? new List<string>() {"4"}
- : name == "ReceiveName"
- ? new List<string>() {"5"}
- : name == "TransportName"
- ? new List<string>() {"6"}
- : new List<string>() {""});
- all = EntityHelper.GetData<CmmInputRecordEntity>(
- "com.steering.Mcms.InputRecordServer.doQuery", new object[] { dic },
- _ob);
- ugStation.DisplayLayout.Bands[0].Columns["RecordValue"].Header.Caption = text;
- cmmInputRecordEntityBindingSource.DataSource = all;
- }
- private CmmInputRecordEntity selectRow = null;
- private List<CmmInputRecordEntity> all;
- public CmmInputRecordEntity SelectRow
- {
- get { return selectRow; }
- set { selectRow = value; }
- }
- private void ugStation_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- selectRow = e.Row.ListObject as CmmInputRecordEntity;
- this.DialogResult = DialogResult.OK;
- }
- private void txtQuery_KeyUp(object sender, KeyEventArgs e)
- {
- if(all==null) return;
- cmmInputRecordEntityBindingSource.DataSource = string.IsNullOrWhiteSpace(txtQuery.Text.Trim()) ? all :
- all.Where(p => p.RecordValue.IndexOf(txtQuery.Text.Trim(), StringComparison.Ordinal) >= 0).ToList();
- ugStation.UpdateData();
- ugStation.Update();
- ugStation.Refresh();
- }
- }
- }
|