From 12a6316ffa897b4ce4205f545b88359195b386d6 Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期三, 25 九月 2024 17:34:24 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs |   23 ++++++++++-------------
 1 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs
index bb8e909..c27376c 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs
@@ -48,7 +48,7 @@
         {
             _project = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetByID(projectId);
             await SetBindingData(_project);
-            //this.xhsSchemeMgrListCtrl1.SetBindingData(projectId);
+            //this.xhsSchemeMgrListCtrl1.SetMatching(projectId);
             //_project = await new BLL.XhsProjectStd().GetByID(projectId);
             //this.PageTitle.Caption = 
             //var projectSite = await new BLL.XhsProjectSiteStd().GetDefaultByProjectID(_project.ID);
@@ -76,10 +76,15 @@
         }
 
         //椤圭洰绔欓�夋嫨鏀瑰彉浜嬩欢
-        private void XhsProjectSimulationSchemeMgrCtrl1_ProjectSiteSelectedChangedEvent(XhsProjectSiteVmo obj)
+        private async void XhsProjectSimulationSchemeMgrCtrl1_ProjectSiteSelectedChangedEvent(XhsProjectSiteVmo obj)
         {
             _projectSite = obj;
-
+            if (_projectSite != null)
+            {
+                var hydroRelation = await BLLFactory<Yw.BLL.HydroModelRelation>.Instance
+                   .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, _projectSite.ID, HStation.Xhs.Purpose.Simulation);
+                _hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroRelation.ModelID);
+            }
         }
 
         //鏄剧ず椤圭洰淇℃伅浜嬩欢
@@ -94,11 +99,7 @@
             if (!IsExistPage(guid, true))
             {
                 var page = new XhsProjectSimulationInfoPage();
-                await page.SetBindingData(_project, _projectSite);
-                // page.SetBindingData(_project.ID);
-                //page.PageTitle.Caption = e.Element.Text;
-                //page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage;
-                //page.PageTitle.SvgImageSize = svg_image_size;
+                await page.SetBindingData(_project, _projectSite, _hydroInfo);
                 CreatePage(page, guid);
             }
 
@@ -116,11 +117,7 @@
             if (!IsExistPage(guid, true))
             {
                 var page = new XhsProjectSimulationCorePage();
-                await page.SetBindingData(_project, _projectSite);
-                //page.SetBindingData(_project.ID);
-                //page.PageTitle.Caption = e.Element.Text;
-                //page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage;
-                //page.PageTitle.SvgImageSize = svg_image_size;
+                await page.SetBindingData(_project, _projectSite, _hydroInfo);
                 CreatePage(page, guid);
             }
         }

--
Gitblit v1.9.3