From 44c67892cddc9b7f7091e446fc2030f0b22a82b3 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期五, 20 十二月 2024 22:46:40 +0800
Subject: [PATCH] 构件列表优化

---
 WinFrmUI/HStation.WinFrmUI.Assets.Core/04-pipe/02-main/PipeViewModel.cs |   60 +++++++++++++++++++++++++++++++++++++-----------------------
 1 files changed, 37 insertions(+), 23 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Assets.Core/04-pipe/02-main/PipeViewModel.cs b/WinFrmUI/HStation.WinFrmUI.Assets.Core/04-pipe/02-main/PipeViewModel.cs
index 1e59549..42de389 100644
--- a/WinFrmUI/HStation.WinFrmUI.Assets.Core/04-pipe/02-main/PipeViewModel.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Assets.Core/04-pipe/02-main/PipeViewModel.cs
@@ -8,10 +8,10 @@
         {
         }
 
-        public PipeViewModel(Vmo.PipeMainVmo rhs)
+        public PipeViewModel(Vmo.AssetsPipeMainVmo rhs)
         {
             this.ID = rhs.ID;
-            this.Description = rhs.Description;
+            this.Name = rhs.Name;
             if (rhs.Caliber == null)
             {
                 this.Caliber = "榛樿";
@@ -20,22 +20,27 @@
             {
                 this.Caliber = rhs.Caliber.ToString();
             }
-            this.MaterialName = rhs.MaterialName;
+            if (rhs.Material == null)
+            {
+                this.Material = "榛樿";
+            }
+            else
+            {
+                this.Material = rhs.Material.ToString();
+            }
             this.Hazen = rhs.Hazen;
             this.Darcy = rhs.Darcy;
             this.Manning = rhs.Manning;
-            this.Name = rhs.Name;
+            this.MinorLoss = rhs.MinorLoss;
             this.SortCode = rhs.SortCode;
-            this.KeyWord = rhs.KeyWord;
-            this.IsDefault = rhs.IsDefault;
+            this.Description = rhs.Description;
+            this.KeyWord = string.Join(",", rhs.KeyWord);
         }
 
-        public void Reset(Vmo.PipeMainVmo rhs)
+        public void Reset(Vmo.AssetsPipeMainVmo rhs)
         {
             this.ID = rhs.ID;
-            this.Hazen = rhs.Hazen;
-            this.Darcy = rhs.Darcy;
-            this.Manning = rhs.Manning;
+            this.Name = rhs.Name;
             if (rhs.Caliber == null)
             {
                 this.Caliber = "榛樿";
@@ -44,12 +49,21 @@
             {
                 this.Caliber = rhs.Caliber.ToString();
             }
-            this.MaterialName = rhs.MaterialName;
-            this.Description = rhs.Description;
-            this.Name = rhs.Name;
-            this.KeyWord = rhs.KeyWord;
-            this.IsDefault = rhs.IsDefault;
+            if (rhs.Material == null)
+            {
+                this.Material = "榛樿";
+            }
+            else
+            {
+                this.Material = rhs.Material.ToString();
+            }
+            this.Hazen = rhs.Hazen;
+            this.Darcy = rhs.Darcy;
+            this.Manning = rhs.Manning;
+            this.MinorLoss = rhs.MinorLoss;
             this.SortCode = rhs.SortCode;
+            this.Description = rhs.Description;
+            this.KeyWord = string.Join(",", rhs.KeyWord);
         }
 
         /// <summary>
@@ -76,7 +90,7 @@
         /// </summary>
         [DisplayName("鏉愭枡")]
         [Browsable(true)]
-        public string MaterialName { get; set; }
+        public string Material { get; set; }
 
         /// <summary>
         /// Hazen
@@ -100,6 +114,13 @@
         public double? Manning { get; set; }
 
         /// <summary>
+        /// 绯绘暟
+        /// </summary>
+        [DisplayName("灞�闃荤郴鏁�")]
+        [Browsable(true)]
+        public double MinorLoss { get; set; }
+
+        /// <summary>
         /// 鎺掑簭鐮�
         /// </summary>
         [DisplayName("鎺掑簭鐮�")]
@@ -112,13 +133,6 @@
         [DisplayName("鍏抽敭瀛�")]
         [Browsable(true)]
         public string KeyWord { get; set; }
-
-        /// <summary>
-        /// 鏄惁榛樿
-        /// </summary>
-        [DisplayName("鏄惁榛樿")]
-        [Browsable(true)]
-        public bool IsDefault { get; set; }
 
         /// <summary>
         /// 璇存槑

--
Gitblit v1.9.3