| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- 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 GradeSelect : FrmBase
- {
- public GradeSelect(OpeBase _ob, List<ComBaseGradeEntity> list, string txt)
- {
- InitializeComponent();
- ob = _ob;
- lblShow.Text = txt;
- if (list==null || !list.Any())
- {
- list = EntityHelper.GetData<ComBaseGradeEntity>(
- "com.steering.Mcms.BlankPredictionServer.doQueryGrades",
- new object[] { },
- ob);
- }
- all = list;
- comBaseGradeEntityBindingSource.DataSource = list;
- }
- private ComBaseGradeEntity selectRow = null;
- private List<ComBaseGradeEntity> all;
- public ComBaseGradeEntity SelectRow
- {
- get { return selectRow; }
- set { selectRow = value; }
- }
- private void ugStation_DoubleClickRow(object sender, Infragistics.Win.UltraWinGrid.DoubleClickRowEventArgs e)
- {
- selectRow = e.Row.ListObject as ComBaseGradeEntity;
- this.DialogResult = DialogResult.OK;
- }
- private void txtQuery_KeyUp(object sender, KeyEventArgs e)
- {
- if(all==null) return;
- comBaseGradeEntityBindingSource.DataSource = string.IsNullOrWhiteSpace(txtQuery.Text.Trim()) ? all :
- all.Where(p => p.Gradename.IndexOf(txtQuery.Text.Trim(), StringComparison.Ordinal) >= 0).ToList();
- ugStation.UpdateData();
- ugStation.Update();
- ugStation.Refresh();
- }
- }
- }
|