duheng
2025-02-19 ad8f813f5eddd66740b4e09801e4ea02ddf70a4a
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs
@@ -1,6 +1,4 @@
using System.ComponentModel;
namespace HStation.WinFrmUI.Assets
namespace HStation.WinFrmUI.Assets
{
    public class AssetsValveMainViewModel
    {
@@ -9,7 +7,7 @@
            this.ID = rhs.ID;
            this.Name = rhs.Name;
            this.Description = rhs.Description;
            if (rhs.Caliber == null )
            if (rhs.Caliber == null)
            {
                this.Caliber = "默认";
            }
@@ -17,7 +15,7 @@
            {
                this.Caliber = rhs.Caliber.ToString();
            }
            if (rhs.Material == null|| rhs.Material==string.Empty)
            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 = string.Join(",", 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 = string.Join(",", 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>
        /// 说明