lixiaojun
2024-12-11 e47f92df1569e16a19deed592f773591da02d890
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs
@@ -17,21 +17,20 @@
            {
                this.Caliber = rhs.Caliber.ToString();
            }
            if (rhs.MaterialName == null)
            if (rhs.Material == null || rhs.Material == string.Empty)
            {
                this.Material = "默认";
            }
            else
            {
                this.Material = rhs.MaterialName.ToString();
                this.Material = rhs.Material.ToString();
            }
            this.Coefficient = rhs.Coefficient;
            this.Coefficient = rhs.MinorLoss;
            this.SeriesID = rhs.SeriesID;
            this.SeriesType = rhs.Type;
            this.ValveLift = rhs.ValveLift;
            this.ValveType = rhs.ValveType;
            this.SortCode = rhs.SortCode;
            this.IsDefault = rhs.IsDefault;
            this.KeyWord = rhs.KeyWord;
            this.KeyWord = string.Join(",", rhs.KeyWord);
            this.ValveSetting = rhs.ValveSetting;
        }
        public void Reset(Vmo.AssetsValveMainVmo rhs)
@@ -39,7 +38,7 @@
            this.ID = rhs.ID;
            this.Name = rhs.Name;
            this.Description = rhs.Description;
            this.Material = rhs.MaterialName;
            this.Material = rhs.Material;
            if (rhs.Caliber == null)
            {
                this.Caliber = "默认";
@@ -48,21 +47,20 @@
            {
                this.Caliber = rhs.Caliber.ToString();
            }
            if (rhs.MaterialName == null)
            if (rhs.Material == null || rhs.Material == string.Empty)
            {
                this.Material = "默认";
            }
            else
            {
                this.Material = rhs.MaterialName.ToString();
                this.Material = rhs.Material.ToString();
            }
            this.Coefficient = rhs.Coefficient;
            this.Coefficient = rhs.MinorLoss;
            this.SeriesID = rhs.SeriesID;
            this.SeriesType = rhs.Type;
            this.ValveType = rhs.ValveType;
            this.SortCode = rhs.SortCode;
            this.ValveLift = rhs.ValveLift;
            this.IsDefault = rhs.IsDefault;
            this.KeyWord = rhs.KeyWord;
            this.KeyWord = string.Join(",", rhs.KeyWord);
            this.ValveSetting = rhs.ValveSetting;
        }
        [DisplayName("ID")]
@@ -102,21 +100,14 @@
        /// </summary>
        [DisplayName("类型")]
        [Browsable(true)]
        public HStation.Assets.eAssetsValveSeriesType SeriesType { get; set; }
        public HStation.Assets.eValveType ValveType { get; set; }
        /// <summary>
        /// 说明
        /// </summary>
        [DisplayName("说明")]
        [Browsable(true)]
        public string? Description { get; set; }
        /// <summary>
        /// 阀门开度
        /// </summary>
        [DisplayName("阀门开度")]
        [Browsable(true)]
        public int? ValveLift { get; set; }
        public string Description { get; set; }
        /// <summary>
        /// 排序码
@@ -154,10 +145,10 @@
        public string KeyWord { get; set; }
        /// <summary>
        /// 是否默认
        /// 阀门设置
        /// </summary>
        [DisplayName("是否默认")]
        [DisplayName("阀门设置")]
        [Browsable(true)]
        public bool IsDefault { get; set; }
        public string ValveSetting { get; set; }
    }
}