| | |
| | | Search(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新属性 |
| | | /// </summary> |
| | | public void UpdateProperty() |
| | | { |
| | | if (_allList == null || _allList.Count < 1) |
| | | { |
| | | return; |
| | | } |
| | | _allList.ForEach(x => x.UpdateProperty()); |
| | | this.hydroFlowmeterViewModelBindingSource.ResetBindings(false); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新属性 |
| | | /// </summary> |
| | | public void UpdateProperty(Yw.Model.HydroParterInfo parter) |
| | | { |
| | | if (_allList == null || _allList.Count < 1) |
| | | { |
| | | return; |
| | | } |
| | | if (parter == null) |
| | | { |
| | | return; |
| | | } |
| | | var vm = _allList.Find(x => x.Code == parter.Code); |
| | | if (vm == null) |
| | | { |
| | | return; |
| | | } |
| | | vm.UpdateProperty(); |
| | | this.hydroFlowmeterViewModelBindingSource.ResetBindings(false); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新属性 |
| | | /// </summary> |
| | | public void UpdateProperty(List<Yw.Model.HydroParterInfo> parterList) |
| | | { |
| | | if (_allList == null || _allList.Count < 1) |
| | | { |
| | | return; |
| | | } |
| | | if (parterList == null || parterList.Count < 1) |
| | | { |
| | | return; |
| | | } |
| | | parterList.ForEach(x => |
| | | { |
| | | var vm = _allList.Find(t => x.Code == x.Code); |
| | | if (vm != null) |
| | | { |
| | | vm.UpdateProperty(); |
| | | } |
| | | }); |
| | | this.hydroFlowmeterViewModelBindingSource.ResetBindings(false); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 更新计算属性 |
| | | /// </summary> |
| | | public void UpdateCalcuProperty(List<HydroCalcuResult> allCalcuResultList) |
| | | { |
| | | if (allCalcuResultList != null && allCalcuResultList.Count > 0) |
| | | { |
| | | if (_allList != null && _allList.Count > 0) |
| | | { |
| | | foreach (var parter in _allList) |
| | | { |
| | | var calcuResult = allCalcuResultList.Find(x => x.Code == parter.Code); |
| | | if (calcuResult != null) |
| | | { |
| | | parter.UpdateCalcuProperty(calcuResult); |
| | | } |
| | | } |
| | | this.hydroFlowmeterViewModelBindingSource.ResetBindings(false); |
| | | } |
| | | } |
| | | } |
| | | |
| | | //查询 |
| | | private void Search() |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | public void UpdateProperty() |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | |
| | | public void UpdateProperty(HydroParterInfo parter) |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | |
| | | public void UpdateProperty(List<HydroParterInfo> parterList) |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | |
| | | public void UpdateCalcuProperty(List<HydroCalcuResult> allCalcuResultList) |
| | | { |
| | | throw new NotImplementedException(); |
| | | } |
| | | } |
| | | } |