| | |
| | | using HStation.WinFrmUI.PhartRelation; |
| | | |
| | | namespace HStation.WinFrmUI.Xhs |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class PumpSingleMatchingForm : DevExpress.XtraEditors.XtraUserControl |
| | | public partial class PumpSingleMatchingCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | | public PumpSingleMatchingForm() |
| | | public PumpSingleMatchingCtrl() |
| | | { |
| | | InitializeComponent(); |
| | | this.gridView1.SetNormalView(); |
| | |
| | | |
| | | private List<PumpSingleMatchingViewModel> _allBindingList = null; |
| | | |
| | | private BLL.PumpMain _pumpBll = null; |
| | | private BLL.AssetsPumpMain _pumpBll = null; |
| | | |
| | | private List<PhartViewModel> _allPhartList = null; |
| | | private readonly Lazy<BLL.XhsPumpMainPhartMappingExtensions> _bll_ex = new(); |
| | |
| | | { |
| | | _pumpMatchingViewModel = pumpMatchingViewModel; |
| | | _allBindingList = new List<PumpSingleMatchingViewModel>(); |
| | | _pumpBll = new BLL.PumpMain(); |
| | | var allPumpMain = await _pumpBll.GetAll(); |
| | | foreach (var Main in allPumpMain) |
| | | _pumpBll = new BLL.AssetsPumpMain(); |
| | | var allAssetsPumpMain = await _pumpBll.GetAll(); |
| | | foreach (var Main in allAssetsPumpMain) |
| | | { |
| | | _allBindingList.Add(new PumpSingleMatchingViewModel(Main)); |
| | | } |
| | | this.gridControl2.DataSource = _allBindingList; |
| | | this.searchControl1.Text = pumpMatchingViewModel.ModelType; |
| | | for (int i = 0; i < _allBindingList.Count; i++) |
| | | { |
| | | if (long.TryParse(pumpMatchingViewModel.DbId, out long dbID)) |
| | |
| | | } |
| | | } |
| | | } |
| | | this.gridControl2.DataSource = _allBindingList; |
| | | this.searchControl1.Text = pumpMatchingViewModel.ModelType; |
| | | } |
| | | |
| | | //初始化图表数据 |
| | |
| | | if (vm != null) |
| | | { |
| | | _pumpMatchingViewModel.MatchingDbId = vm.ID.ToString(); |
| | | _pumpMatchingViewModel.MatchingModelType = vm.Name.ToString(); |
| | | _pumpMatchingViewModel.MatchingRatedH = vm.RatedHead; |
| | | _pumpMatchingViewModel.MatchingRatedN = vm.RatedSpeed; |
| | | _pumpMatchingViewModel.MatchingRatedP = vm.RatedPower; |
| | | _pumpMatchingViewModel.MatchingRatedQ = vm.RatedFlow; |
| | | var list = await _bll_ex.Value.GetByPumpMainID(vm.ID); |
| | | if (list != null && list.Any()) |
| | | { |