namespace HStation.WinFrmUI
|
{
|
public partial class PipeLineMatchingCtrl : DevExpress.XtraEditors.XtraUserControl
|
{
|
public PipeLineMatchingCtrl()
|
{
|
InitializeComponent();
|
this.gridView1.SetNormalView(30);
|
this.gridView1.OptionsView.ShowDetailButtons = true;
|
this.gridView1.OptionsView.ShowGroupPanel = false;
|
}
|
|
private List<PipeLineMatchingViewModel> _allBindingList = null;
|
|
public void SetBindingData(List<PipeLineMatchingViewModel> pipeLineMatchingViewModels)
|
{
|
if (_allBindingList != null)
|
{
|
_allBindingList = pipeLineMatchingViewModels;
|
this.pipeLineMatchingViewModelBindingSource.DataSource = _allBindingList;
|
}
|
}
|
|
public List<PipeLineMatchingViewModel> SetMatching(List<PipeLineMatchingViewModel> inputs, List<PipeLineManageVmo> alllist)
|
{
|
if (inputs == null)
|
{
|
return null;
|
}
|
var finishList = new List<PipeLineMatchingViewModel>();
|
foreach (var item in inputs)
|
{
|
var result = AsstesAutoMatchingHelper.PipeAutoMatching(item, alllist);
|
if (result != null)
|
{
|
finishList.Add(result);
|
}
|
else
|
{
|
}
|
}
|
_allBindingList = finishList;
|
this.pipeLineMatchingViewModelBindingSource.ResetBindings(false);
|
return finishList;
|
}
|
}
|
}
|