Shuxia Ning
2024-11-08 0cd48df8ccca96a8a0117a508c342a90dc2eacb8
WinFrmUI/HStation.WinFrmUI.Assets.Core/08-nozzle/02-main/SprinklerViewModel.cs
ÎļþÃû´Ó WinFrmUI/HStation.WinFrmUI.Assets.Core/08-Nozzle/02-main/NozzleViewModel.cs ÐÞ¸Ä
@@ -2,13 +2,13 @@
namespace HStation.WinFrmUI.Assets
{
    public class NozzleViewModel
    public class SprinklerViewModel
    {
        public NozzleViewModel()
        public SprinklerViewModel()
        {
        }
        public NozzleViewModel(Vmo.AssetsNozzleMainVmo rhs)
        public SprinklerViewModel(Vmo.AssetsSprinklerMainVmo rhs)
        {
            this.ID = rhs.ID;
            this.Description = rhs.Description;
@@ -20,24 +20,23 @@
            {
                this.Caliber = rhs.Caliber.ToString();
            }
            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.MinorLoss = rhs.MinorLoss;
            this.Angle = rhs.Angle;
            this.Flowcoefficient = rhs.Flowcoefficient;
            this.FlowMinorLoss = rhs.FlowMinorLoss;
        }
        public void Reset(Vmo.AssetsNozzleMainVmo rhs)
        public void Reset(Vmo.AssetsSprinklerMainVmo rhs)
        {
            this.ID = rhs.ID;
            if (rhs.Caliber == null)
@@ -48,22 +47,21 @@
            {
                this.Caliber = rhs.Caliber.ToString();
            }
            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.SortCode = rhs.SortCode;
            this.Coefficient = rhs.Coefficient;
            this.MinorLoss = rhs.MinorLoss;
            this.Angle = rhs.Angle;
            this.Flowcoefficient = rhs.Flowcoefficient;
            this.FlowMinorLoss = rhs.FlowMinorLoss;
        }
        /// <summary>
@@ -90,28 +88,35 @@
        /// </summary>
        [DisplayName("材料")]
        [Browsable(true)]
        public string MaterialName { get; set; }
        public string Material { get; set; }
        /// <summary>
        /// å–·è§’
        /// </summary>
        [DisplayName("喷角")]
        [Browsable(true)]
        public string Angle { get; set; }
        public int? Angle { get; set; }
        /// <summary>
        /// ç³»æ•°
        /// </summary>
        [DisplayName("喷射系数")]
        [Browsable(true)]
        public double? Coefficient { get; set; }
        public double MinorLoss { get; set; }
        /// <summary>
        /// æµé‡ç³»æ•°
        /// </summary>
        [DisplayName("流量系数")]
        [Browsable(true)]
        private double? Flowcoefficient { get; set; }
        private double? FlowMinorLoss { get; set; }
        /// <summary>
        /// è¯†åˆ«å…³é”®å­—
        /// </summary>
        [DisplayName("关键字")]
        [Browsable(true)]
        public List<string> KeyWord { get; set; }
        /// <summary>
        /// æŽ’序码
@@ -119,20 +124,6 @@
        [DisplayName("排序码")]
        [Browsable(true)]
        public int SortCode { get; set; }
        /// <summary>
        /// è¯†åˆ«å…³é”®å­—
        /// </summary>
        [DisplayName("关键字")]
        [Browsable(true)]
        public string KeyWord { get; set; }
        /// <summary>
        /// æ˜¯å¦é»˜è®¤
        /// </summary>
        [DisplayName("是否默认")]
        [Browsable(true)]
        public bool IsDefault { get; set; }
        /// <summary>
        /// è¯´æ˜Ž