From 46f64905a3c309a50c0f245b3350cdeb8dd699c6 Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期三, 22 一月 2025 17:29:02 +0800 Subject: [PATCH] 计算优化 --- WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs | 21 +++++---------------- 1 files changed, 5 insertions(+), 16 deletions(-) diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs index 9d44c12..281c807 100644 --- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs +++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs @@ -1,6 +1,4 @@ -锘縰sing System.ComponentModel; - -namespace HStation.WinFrmUI.Assets +锘縩amespace HStation.WinFrmUI.Assets { public class AssetsValveMainViewModel { @@ -17,7 +15,7 @@ { this.Caliber = rhs.Caliber.ToString(); } - if (rhs.Material == null) + if (rhs.Material == null || rhs.Material == string.Empty) { this.Material = "榛樿"; } @@ -27,9 +25,8 @@ } this.Coefficient = rhs.MinorLoss; this.SeriesID = rhs.SeriesID; - this.ValveType = rhs.ValveType; this.SortCode = rhs.SortCode; - this.KeyWord = rhs.KeyWord; + this.KeyWord = string.Join(",", rhs.KeyWords); this.ValveSetting = rhs.ValveSetting; } @@ -47,7 +44,7 @@ { this.Caliber = rhs.Caliber.ToString(); } - if (rhs.Material == null) + if (rhs.Material == null || rhs.Material == string.Empty) { this.Material = "榛樿"; } @@ -57,9 +54,8 @@ } this.Coefficient = rhs.MinorLoss; this.SeriesID = rhs.SeriesID; - this.ValveType = rhs.ValveType; this.SortCode = rhs.SortCode; - this.KeyWord = rhs.KeyWord; + this.KeyWord = string.Join(",", rhs.KeyWords); this.ValveSetting = rhs.ValveSetting; } @@ -94,13 +90,6 @@ [DisplayName("鎹熷け绯绘暟")] [Browsable(true)] public double Coefficient { get; set; } - - /// <summary> - /// 绫诲瀷 - /// </summary> - [DisplayName("绫诲瀷")] - [Browsable(true)] - public HStation.Assets.eValveType ValveType { get; set; } /// <summary> /// 璇存槑 -- Gitblit v1.9.3