From 56f8d725e3e195a937da02aff340deeb32e6e5ac Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期五, 13 十二月 2024 14:36:20 +0800
Subject: [PATCH] new bug修复

---
 WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/00-core/HydroJunctionViewModel.cs |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/00-core/HydroJunctionViewModel.cs b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/00-core/HydroJunctionViewModel.cs
index 2e824ce..39b1371 100644
--- a/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/00-core/HydroJunctionViewModel.cs
+++ b/WinFrmUI/Yw.WinFrmUI.Hydro.Core/04-viewmodel/03-node/03-junction/00-core/HydroJunctionViewModel.cs
@@ -23,8 +23,6 @@
             this.UpdatePropStatus(nameof(this.Demand), rhs, nameof(rhs.Demand));
             this.DemandPattern = rhs.DemandPattern;
             this.UpdatePropStatus(nameof(this.DemandPattern), rhs, nameof(rhs.DemandPattern));
-
-            this.Vmo = rhs;
         }
 
 
@@ -66,7 +64,7 @@
         [Category("鏁版嵁")]
         [DisplayName("闇�姘存ā寮�")]
         [Display(Name = "闇�姘存ā寮�")]
-        [IsHydroPatternPro(HydroPattern.Demand)]
+        [HydroPatternPro(HydroPattern.Demand)]
         [PropertyOrder(2004)]
         [Browsable(false)]
         public virtual string DemandPattern { get; set; }
@@ -75,14 +73,18 @@
         /// 
         /// </summary>
         [Browsable(false)]
-        public new Yw.Model.HydroJunctionInfo Vmo { get; set; }
+        public new Yw.Model.HydroJunctionInfo Vmo
+        {
+            get { return _vmo as Yw.Model.HydroJunctionInfo; }
+            set { _vmo = value; }
+        }
 
         /// <summary>
         /// 
         /// </summary>
-        public override void Update()
+        public override void UpdateProperty()
         {
-            base.Update();
+            base.UpdateProperty();
             this.Elev = this.Vmo.Elev;
             this.UpdatePropStatus(nameof(this.Elev), this.Vmo, nameof(this.Vmo.Elev));
             this.MinorLoss = this.Vmo.MinorLoss;
@@ -93,7 +95,21 @@
             this.UpdatePropStatus(nameof(this.DemandPattern), this.Vmo, nameof(this.Vmo.DemandPattern));
         }
 
-
+        /// <summary>
+        /// 
+        /// </summary>
+        public override void UpdateVmoProperty()
+        {
+            base.UpdateVmoProperty();
+            this.Vmo.Elev = this.Elev;
+            this.Vmo.UpdatePropStatus(nameof(this.Vmo.Elev), this, nameof(this.Elev));
+            this.Vmo.MinorLoss = this.MinorLoss;
+            this.Vmo.UpdatePropStatus(nameof(this.Vmo.MinorLoss), this, nameof(this.MinorLoss));
+            this.Vmo.Demand = this.Demand;
+            this.Vmo.UpdatePropStatus(nameof(this.Vmo.Demand), this, nameof(this.Demand));
+            this.Vmo.DemandPattern = this.DemandPattern;
+            this.Vmo.UpdatePropStatus(nameof(this.Vmo.DemandPattern), this, nameof(this.DemandPattern));
+        }
 
 
     }

--
Gitblit v1.9.3