lixiaojun
2024-10-23 93bc151189c3956c80701bf1adf7600be6f19ee7
WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs
@@ -2,14 +2,13 @@
namespace HStation.WinFrmUI.Assets
{
    public class ValveMainViewModel
    public class AssetsValveMainViewModel
    {
        public ValveMainViewModel(Vmo.ValveMainVmo rhs)
        public AssetsValveMainViewModel(Vmo.AssetsValveMainVmo rhs)
        {
            this.ID = rhs.ID;
            this.Name = rhs.Name;
            this.Description = rhs.Description;
            this.Material = rhs.Material;
            if (rhs.Caliber == null)
            {
                this.Caliber = "默认";
@@ -18,18 +17,27 @@
            {
                this.Caliber = rhs.Caliber.ToString();
            }
            if (rhs.MaterialName == null)
            {
                this.Material = "默认";
            }
            else
            {
                this.Material = rhs.MaterialName.ToString();
            }
            this.Coefficient = rhs.Coefficient;
            this.SeriesID = rhs.SeriesID;
            this.SeriesType = rhs.SeriesType;
            this.ValveLift = rhs.ValveLift;
            this.SortCode = rhs.SortCode;
        }
        public void Reset(Vmo.ValveMainVmo rhs)
        public void Reset(Vmo.AssetsValveMainVmo rhs)
        {
            this.ID = rhs.ID;
            this.Name = rhs.Name;
            this.Description = rhs.Description;
            this.Material = rhs.Material;
            this.Material = rhs.MaterialName;
            if (rhs.Caliber == null)
            {
                this.Caliber = "默认";
@@ -38,10 +46,19 @@
            {
                this.Caliber = rhs.Caliber.ToString();
            }
            if (rhs.MaterialName == null)
            {
                this.Material = "默认";
            }
            else
            {
                this.Material = rhs.MaterialName.ToString();
            }
            this.Coefficient = rhs.Coefficient;
            this.SeriesID = rhs.SeriesID;
            this.SeriesType = rhs.SeriesType;
            this.SortCode = rhs.SortCode;
            this.ValveLift = rhs.ValveLift;
        }
        [DisplayName("ID")]
@@ -81,7 +98,7 @@
        /// </summary>
        [DisplayName("类型")]
        [Browsable(true)]
        public HStation.Assets.eValveSeriesType SeriesType { get; set; }
        public HStation.Assets.eAssetsValveSeriesType SeriesType { get; set; }
        /// <summary>
        /// 说明
@@ -91,6 +108,13 @@
        public string? Description { get; set; }
        /// <summary>
        /// 阀门状态
        /// </summary>
        [DisplayName("阀门状态")]
        [Browsable(true)]
        public int ValveLift { get; set; }
        /// <summary>
        /// 排序码
        /// </summary>
        [DisplayName("排序码")]