duheng
2024-11-27 d573ccd77f6df9be1798bd36f37c3cadeae5b9c9
WinFrmUI/HStation.WinFrmUI.Assets.Core/10-exchanger/02-main/ExchangerViewModel.cs
@@ -12,38 +12,36 @@
        {
            this.ID = rhs.ID;
            this.Description = rhs.Description;
            if (rhs.MaterialName == null)
            if (rhs.Material == null)
            {
                this.MaterialName = "默认";
                this.Material = "默认";
            }
            else
            {
                this.MaterialName = rhs.MaterialName.ToString();
                this.Material = rhs.Material.ToString();
            }
            this.Name = rhs.Name;
            this.SortCode = rhs.SortCode;
            this.KeyWord = rhs.KeyWord;
            this.IsDefault = rhs.IsDefault;
            this.Coefficient = rhs.Coefficient;
            this.KeyWord = string.Join(",", rhs.KeyWord);
            this.MinorLoss = rhs.MinorLoss;
        }
        public void Reset(Vmo.AssetsExchangerMainVmo rhs)
        {
            this.ID = rhs.ID;
            if (rhs.MaterialName == null)
            if (rhs.Material == null)
            {
                this.MaterialName = "默认";
                this.Material = "默认";
            }
            else
            {
                this.MaterialName = rhs.MaterialName.ToString();
                this.Material = rhs.Material.ToString();
            }
            this.Description = rhs.Description;
            this.Name = rhs.Name;
            this.KeyWord = rhs.KeyWord;
            this.IsDefault = rhs.IsDefault;
            this.KeyWord = string.Join(",", rhs.KeyWord);
            this.SortCode = rhs.SortCode;
            this.Coefficient = rhs.Coefficient;
            this.MinorLoss = rhs.MinorLoss;
        }
        /// <summary>
@@ -59,25 +57,18 @@
        public string Name { get; set; }
        /// <summary>
        /// 口径
        /// </summary>
        [DisplayName("口径(mm)")]
        [Browsable(true)]
        public string Caliber { get; set; }
        /// <summary>
        /// 材料
        /// </summary>
        [DisplayName("材料")]
        [Browsable(true)]
        public string MaterialName { get; set; }
        public string Material { get; set; }
        /// <summary>
        /// 系数
        /// </summary>
        [DisplayName("损失系数")]
        [Browsable(true)]
        public double? Coefficient { get; set; }
        public double MinorLoss { get; set; }
        /// <summary>
        /// 排序码
@@ -92,13 +83,6 @@
        [DisplayName("关键字")]
        [Browsable(true)]
        public string KeyWord { get; set; }
        /// <summary>
        /// 是否默认
        /// </summary>
        [DisplayName("是否默认")]
        [Browsable(true)]
        public bool IsDefault { get; set; }
        /// <summary>
        /// 说明