| | |
| | | namespace HStation.WinFrmUI.Xhs |
| | | namespace HStation.WinFrmUI |
| | | { |
| | | public partial class XhsProjectSimulationMatchingListCtrl : DevExpress.XtraEditors.XtraUserControl |
| | | { |
| | |
| | | |
| | | public event Func<AssetsMatchingViewModel, bool> ApplyMatchingEvent; |
| | | |
| | | private BLL.PumpMain _pumpMain = null; |
| | | private BLL.AssetsPumpMain _AssetsPumpMain = null; |
| | | |
| | | private BLL.AdaptingManage _adaptingManage = null; |
| | | |
| | | private BLL.PipeLineManage _pipeLineManage = null; |
| | | private BLL.AssetsPipeMain _pipeLineManage = null; |
| | | |
| | | private BLL.ValveMain _valveMain = null; |
| | | private BLL.AssetsValveMain _AssetsValveMain = null; |
| | | |
| | | private AssetsMatchingViewModel _assetsAutoMatching = null; |
| | | |
| | |
| | | this.pipeLineMatchingCtrl1.SetBindingData(inputViewModel.PipeMatchingList); |
| | | this.pumpMatchingCtrl1.SetBindingData(inputViewModel.PumpMatchingList); |
| | | this.threeLinkMatchingCtrl1.SetBindingData(inputViewModel.ThreelinkMatchingList); |
| | | this.fourLinkMatchingCtrl1.SetBindingData(inputViewModel.FourlinkMatchingList); |
| | | if (inputViewModel.FourlinkMatchingList == null || inputViewModel.FourlinkMatchingList.Count == 0) |
| | | { |
| | | tabNavigationPageFourlink.PageVisible = false; |
| | | } |
| | | else |
| | | { |
| | | this.fourLinkMatchingCtrl1.SetBindingData(inputViewModel.FourlinkMatchingList); |
| | | } |
| | | this.valveMatchingCtrl1.SetBindingData(inputViewModel.ValveMatchingList); |
| | | await SetMatching(inputViewModel); |
| | | } |
| | |
| | | { |
| | | if (input == null) |
| | | return null; |
| | | _pumpMain = new BLL.PumpMain(); |
| | | _AssetsPumpMain = new BLL.AssetsPumpMain(); |
| | | _adaptingManage = new BLL.AdaptingManage(); |
| | | _pipeLineManage = new BLL.PipeLineManage(); |
| | | _valveMain = new BLL.ValveMain(); |
| | | var allPump = await _pumpMain.GetAll(); |
| | | _pipeLineManage = new BLL.AssetsPipeMain(); |
| | | _AssetsValveMain = new BLL.AssetsValveMain(); |
| | | var allPump = await _AssetsPumpMain.GetAll(); |
| | | var allAdapting = await _adaptingManage.GetAll(); |
| | | var allPipeLine = await _pipeLineManage.GetAll(); |
| | | var allValve = await _valveMain.GetAll(); |
| | | var allValve = await _AssetsValveMain.GetAll(); |
| | | var allElbow = await new BLL.AssetsElbowMain().GetAll(); |
| | | var allThreeLink = await new BLL.AssetsThreelinkMain().GetAll(); |
| | | var allFourLink = await new BLL.AssetsFourlinkMain().GetAll(); |
| | | var assetsAutoMatching = new AssetsMatchingViewModel(); |
| | | //泵匹配 |
| | | var pumpMatching = await this.pumpMatchingCtrl1.SetMatching(input.PumpMatchingList, allPump); |
| | | //三通匹配 |
| | | var threeLinkMatching = this.threeLinkMatchingCtrl1.SetMatching(input.ThreelinkMatchingList, allAdapting); |
| | | var threeLinkMatching = this.threeLinkMatchingCtrl1.SetMatching(input.ThreelinkMatchingList, allThreeLink); |
| | | //四通匹配 |
| | | var fourLinkMatching = this.fourLinkMatchingCtrl1.SetMatching(input.FourlinkMatchingList, allAdapting); |
| | | var fourLinkMatching = this.fourLinkMatchingCtrl1.SetMatching(input.FourlinkMatchingList, allFourLink); |
| | | //管道匹配 |
| | | var pipeLineMatching = this.pipeLineMatchingCtrl1.SetMatching(input.PipeMatchingList, allPipeLine); |
| | | //阀门匹配 |
| | | var valveMatching = this.valveMatchingCtrl1.SetMatching(input.ValveMatchingList, allValve); |
| | | //弯头匹配 |
| | | var elbowsMatching = this.elbowsMatchingCtrl1.SetMatching(input.ElbowMatchingList, allAdapting); |
| | | var elbowsMatching = this.elbowsMatchingCtrl1.SetMatching(input.ElbowMatchingList, allElbow); |
| | | |
| | | assetsAutoMatching.PumpMatchingList = pumpMatching; |
| | | assetsAutoMatching.ThreelinkMatchingList = threeLinkMatching; |