| | |
| | | private BLL.AssetsExchangerMain _ExchangerBll = null; |
| | | |
| | | private List<PhartViewModel> _allPhartList = null; |
| | | private readonly Lazy<BLL.AssetsExchangerCoefficient> _bll_ex = new(); |
| | | //private readonly Lazy<BLL.AssetsExchangerCoefficient> _bll_ex = new(); |
| | | |
| | | private HydroExchangerMatchingViewModel _pumpMatchingViewModel; |
| | | |
| | |
| | | _valveMatchingViewModel.MatchingMaterial = vm.Material; |
| | | _valveMatchingViewModel.MatchingExchangerType = (eExchangerType?)vm.SeriesType; |
| | | _valveMatchingViewModel.MatchingExchangerSetting = vm.ExchangerSetting;*/ |
| | | var list = await _bll_ex.Value.GetByMainID(vm.ID); |
| | | if (list != null && list.Any()) |
| | | { |
| | | foreach (var item in list) |
| | | { |
| | | _allPhartList.Add(new PhartViewModel { ID = item.ID }); |
| | | } |
| | | } |
| | | //var list = await _bll_ex.Value.GetByMainID(vm.ID); |
| | | //if (list != null && list.Any()) |
| | | //{ |
| | | // foreach (var item in list) |
| | | // { |
| | | // _allPhartList.Add(new PhartViewModel { ID = item.ID }); |
| | | // } |
| | | //} |
| | | } |
| | | if (_pumpMatchingViewModel.MatchingCurveDbId != null) |
| | | { |
| | |
| | | { |
| | | var vm = this.gridView1.GetCurrentViewModel(_allPhartList); |
| | | |
| | | var vmo = await _bll_ex.Value.GetByID(vm.ID); |
| | | if (vmo != null) |
| | | { |
| | | var dlg = new ExchangerChartShowDlg(); |
| | | dlg.InitChart(vmo.MinorLossCurve); |
| | | dlg.ShowDialog(); |
| | | } |
| | | //var vmo = await _bll_ex.Value.GetByID(vm.ID); |
| | | //if (vmo != null) |
| | | //{ |
| | | // var dlg = new ExchangerChartShowDlg(); |
| | | // dlg.InitChart(vmo.MinorLossCurve); |
| | | // dlg.ShowDialog(); |
| | | //} |
| | | return; |
| | | } |
| | | } |
| | |
| | | _currentCurvePoint.Clear(); |
| | | if (vm == null) |
| | | return; |
| | | var vmo = await _bll_ex.Value.GetByID(vm.ID); |
| | | if (vmo != null) |
| | | { |
| | | _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); |
| | | } |
| | | //var vmo = await _bll_ex.Value.GetByID(vm.ID); |
| | | //if (vmo != null) |
| | | //{ |
| | | // _pumpMatchingViewModel.MatchingCurveDbId = vm.ID.ToString(); |
| | | //} |
| | | } |
| | | } |
| | | } |