From 8981c9f11f01973ddbf9718ff5935ebfe6dc6b40 Mon Sep 17 00:00:00 2001 From: duheng <2784771470@qq.com> Date: 星期五, 20 九月 2024 18:33:13 +0800 Subject: [PATCH] 报错修改 --- WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs | 27 ++++++++++++++++++++++----- 1 files changed, 22 insertions(+), 5 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs index 8daf3ee..f5b9428 100644 --- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs +++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsMainChoicePage.cs @@ -5,7 +5,15 @@ public AssetsMainChoicePage() { InitializeComponent(); + this.elbowsMatchingCtrl1.RowClickEvent += RowClickEvent; } + + private void RowClickEvent(string code) + { + FormRowClickEvent.Invoke(code); + } + + public event Action<string> FormRowClickEvent = null; private BLL.PumpMain _pumpMain = null; @@ -15,7 +23,7 @@ private BLL.ValveMain _valveMain = null; - public void SetBindingData(AssetsAutoMatchingInputViewModel inputViewModel) + public void SetBindingData(AssetsAutoMatchingViewModel inputViewModel) { this.elbowsMatchingCtrl1.SetBindingData(inputViewModel.ElbowsMatchingModels); this.pipeLineMatchingCtrl1.SetBindingData(inputViewModel.PipeLineMatchingModels); @@ -28,8 +36,10 @@ /// <summary> /// 鍒濆鍖� /// </summary> - public async Task<AssetsAutoMatchingInputViewModel> SetMatching(AssetsAutoMatchingInputViewModel input) + public async Task<AssetsAutoMatchingViewModel> SetMatching(AssetsAutoMatchingViewModel input) { + if (input == null) + return null; _pumpMain = new BLL.PumpMain(); _adaptingManage = new BLL.AdaptingManage(); _pipeLineManage = new BLL.PipeLineManage(); @@ -38,7 +48,7 @@ var allAdapting = await _adaptingManage.GetAll(); var allPipeLine = await _pipeLineManage.GetAll(); var allValve = await _valveMain.GetAll(); - var assetsAutoMatching = new AssetsAutoMatchingInputViewModel(); + var assetsAutoMatching = new AssetsAutoMatchingViewModel(); //娉靛尮閰� var pumpMatching = await this.pumpMatchingCtrl1.SetMatching(input.PumpMatchingModels, allPump); //涓夐�氬尮閰� @@ -46,11 +56,18 @@ //鍥涢�氬尮閰� var fourLinkMatching = this.fourLinkMatchingCtrl1.SetMatching(input.FourLinkMatchingModels, allAdapting); //绠¢亾鍖归厤 - var PipeLineMatching = this.pipeLineMatchingCtrl1.SetMatching(input.PipeLineMatchingModels, allPipeLine); + var pipeLineMatching = this.pipeLineMatchingCtrl1.SetMatching(input.PipeLineMatchingModels, allPipeLine); //闃�闂ㄥ尮閰� - var ValveMatching = this.valveMatchingCtrl1.SetMatching(input.ValveMatchingModels, allValve); + var valveMatching = this.valveMatchingCtrl1.SetMatching(input.ValveMatchingModels, allValve); + //寮ご鍖归厤 + var elbowsMatching = this.elbowsMatchingCtrl1.SetMatching(input.ElbowsMatchingModels, allAdapting); + assetsAutoMatching.PumpMatchingModels = pumpMatching; assetsAutoMatching.ThreeLinkMatchingModels = threeLinkMatching; + assetsAutoMatching.FourLinkMatchingModels = fourLinkMatching; + assetsAutoMatching.ElbowsMatchingModels = elbowsMatching; + assetsAutoMatching.PipeLineMatchingModels = pipeLineMatching; + assetsAutoMatching.ValveMatchingModels = valveMatching; return assetsAutoMatching; } } -- Gitblit v1.9.3