From 208ca42e1c20afafbe48d66259d553ee81eb48ed Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期三, 13 十一月 2024 11:02:43 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs |   57 +++++++++++++++++++++++++++++++++++++++++++++------------
 1 files changed, 45 insertions(+), 12 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs
index fa46010..f61627a 100644
--- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/03-valve/00-viewmodel/ValveMainViewModel.cs
+++ b/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,13 +17,23 @@
             {
                 this.Caliber = rhs.Caliber.ToString();
             }
-            this.Coefficient = rhs.Coefficient;
+            if (rhs.Material == null)
+            {
+                this.Material = "榛樿";
+            }
+            else
+            {
+                this.Material = rhs.Material.ToString();
+            }
+            this.Coefficient = rhs.MinorLoss;
             this.SeriesID = rhs.SeriesID;
-            this.SeriesType = rhs.SeriesType;
+            this.ValveType = rhs.ValveType;
             this.SortCode = rhs.SortCode;
+            this.KeyWord = string.Join(",", rhs.KeyWord);
+            this.ValveSetting = rhs.ValveSetting;
         }
 
-        public void Reset(Vmo.ValveMainVmo rhs)
+        public void Reset(Vmo.AssetsValveMainVmo rhs)
         {
             this.ID = rhs.ID;
             this.Name = rhs.Name;
@@ -38,10 +47,20 @@
             {
                 this.Caliber = rhs.Caliber.ToString();
             }
-            this.Coefficient = rhs.Coefficient;
+            if (rhs.Material == null)
+            {
+                this.Material = "榛樿";
+            }
+            else
+            {
+                this.Material = rhs.Material.ToString();
+            }
+            this.Coefficient = rhs.MinorLoss;
             this.SeriesID = rhs.SeriesID;
-            this.SeriesType = rhs.SeriesType;
+            this.ValveType = rhs.ValveType;
             this.SortCode = rhs.SortCode;
+            this.KeyWord = string.Join(",", rhs.KeyWord);
+            this.ValveSetting = rhs.ValveSetting;
         }
 
         [DisplayName("ID")]
@@ -81,14 +100,14 @@
         /// </summary>
         [DisplayName("绫诲瀷")]
         [Browsable(true)]
-        public HStation.Assets.eValveSeriesType SeriesType { get; set; }
+        public HStation.Assets.eValveType ValveType { get; set; }
 
         /// <summary>
         /// 璇存槑
         /// </summary>
         [DisplayName("璇存槑")]
         [Browsable(true)]
-        public string? Description { get; set; }
+        public string Description { get; set; }
 
         /// <summary>
         /// 鎺掑簭鐮�
@@ -108,14 +127,28 @@
         /// 鍒涘缓浜�
         /// </summary>
         [DisplayName("鍒涘缓浜�")]
-        [Browsable(true)]
+        [Browsable(false)]
         public string CreateName { get; set; }
 
         /// <summary>
         /// 鍒涘缓鏃堕棿
         /// </summary>
         [DisplayName("鍒涘缓鏃堕棿")]
-        [Browsable(true)]
+        [Browsable(false)]
         public string CreateTime { get; set; }
+
+        /// <summary>
+        /// 璇嗗埆鍏抽敭瀛�
+        /// </summary>
+        [DisplayName("鍏抽敭瀛�")]
+        [Browsable(true)]
+        public string KeyWord { get; set; }
+
+        /// <summary>
+        /// 闃�闂ㄨ缃�
+        /// </summary>
+        [DisplayName("闃�闂ㄨ缃�")]
+        [Browsable(true)]
+        public string ValveSetting { get; set; }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3