duheng
2024-09-20 b2e753b7d889e1a1fbc17f8b43c3dd02aa0faad4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
namespace HStation.WinFrmUI
{
    public partial class ValveMatchingCtrl : DevExpress.XtraEditors.XtraUserControl
    {
        public ValveMatchingCtrl()
        {
            InitializeComponent();
            this.gridView1.SetNormalView(30);
            this.gridView1.OptionsView.ShowDetailButtons = true;
            this.gridView1.OptionsView.ShowGroupPanel = false;
        }
 
        private List<ValveMatchingViewModel> _allBindingList = null;
 
        public List<ValveMatchingViewModel> SetBindingData(List<ValveMatchingViewModel> inputs, List<ValveMainVmo> alllist)
        {
            var finishList = new List<ValveMatchingViewModel>();
            foreach (var item in inputs)
            {
                var result = AsstesAutoMatchingHelper.ValveMatching(item, alllist);
                if (result != null)
                {
                    finishList.Add(result);
                }
                else
                {
                }
            }
            _allBindingList = finishList;
            this.valveMatchingViewModelBindingSource.DataSource = _allBindingList;
            this.valveMatchingViewModelBindingSource.ResetBindings(false);
            return finishList;
        }
    }
}