using DevExpress.Dialogs.Core.View; namespace HStation.WinFrmUI { public partial class ThreeLinkMatchingCtrl : DevExpress.XtraEditors.XtraUserControl { public ThreeLinkMatchingCtrl() { InitializeComponent(); this.gridView1.SetNormalView(30); this.gridView1.OptionsView.ShowDetailButtons = true; this.gridView1.OptionsView.ShowGroupPanel = false; } private List _allBindingList = null; public void SetBindingData(List threeLinkMatchingViewModels) { if (threeLinkMatchingViewModels != null) { _allBindingList = threeLinkMatchingViewModels; this.threeLinkMatchingViewModelBindingSource.DataSource = _allBindingList; } } public List SetMatching(List inputs, List alllist) { if (inputs == null || inputs.Count == 0) return null; var resultList = new List(); foreach (var item in inputs) { var result = AsstesAutoMatchingHelper.AutoMatching(item, alllist); if (result != null) { resultList.Add(result); } else { item.MatchingType = Xhs.eMatchingType.Error; resultList.Add(result); } } _allBindingList = resultList; this.threeLinkMatchingViewModelBindingSource.ResetBindings(false); return resultList; } } }