From 97c4b1bc4ca88c5487f8ae38a0da32c93b66c4ce Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期五, 27 九月 2024 08:34:37 +0800
Subject: [PATCH] 功能修改

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

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs
index c27376c..e0a03d2 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/XhsProjectSimulationMgrPage.cs
@@ -27,6 +27,15 @@
         private Yw.Model.HydroModelInfo _hydroInfo = null;//姘村姏淇℃伅
 
         /// <summary>
+        /// 缁戝畾鏁版嵁
+        /// </summary>
+        public async Task SetBindingData(long projectId)
+        {
+            _project = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetByID(projectId);
+            await SetBindingData(_project);
+        }
+
+        /// <summary>
         /// 璁剧疆鏁版嵁
         /// </summary>
         public async Task SetBindingData(XhsProjectVmo project)
@@ -39,32 +48,6 @@
             _projectId = project.ID;
             this.PageTitle.Caption = $"{_project.Name}\r\n姘村姏妯℃嫙";
             await this.xhsProjectSimulationSchemeMgrCtrl1.SetBindingData(_project);
-        }
-
-        /// <summary>
-        /// 缁戝畾鏁版嵁
-        /// </summary>
-        public async Task SetBindingData(long projectId)
-        {
-            _project = await BLLFactory<HStation.BLL.XhsProject>.Instance.GetByID(projectId);
-            await SetBindingData(_project);
-            //this.xhsSchemeMgrListCtrl1.SetMatching(projectId);
-            //_project = await new BLL.XhsProjectStd().GetByID(projectId);
-            //this.PageTitle.Caption = 
-            //var projectSite = await new BLL.XhsProjectSiteStd().GetDefaultByProjectID(_project.ID);
-            //if (projectSite == null)
-            //{
-            //    return;
-            //}
-
-            //var relation = await new Yw.BLL.HydroModelRelation()
-            //    .GetDefaultByObjectTypeAndObjectIDOfPurpose(HStation.Xhs.DataType.XhsProjectSite, projectSite.ID, Yw.Bimface.Purpose.Simulation);
-            //if (relation == null)
-            //{
-            //    return;
-            //}
-
-            //_hydroInfo = await new Yw.BLL.HydroModelInfo().GetByID(relation.ModelID);
         }
 
         /// <summary>
@@ -84,6 +67,7 @@
                 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);
+                this.xhsProjectSimulationFunctionMgrCtrl1.SetBindingData();
             }
         }
 
@@ -142,108 +126,6 @@
         private void XhsProjectSimulationFunctionMgrCtrl1_CompareXhsProjectSchemeEvent(DevExpress.Utils.Svg.SvgImage obj)
         {
 
-        }
-
-
-
-
-
-
-
-        //鍔熻兘鐐瑰嚮
-        private async void accordionControl1_ElementClick(object sender, DevExpress.XtraBars.Navigation.ElementClickEventArgs e)
-        {
-            var tag = e.Element.Tag;
-            if (tag is not string code)
-                return;
-
-            var svg_image_size = new Size(24, 24);
-            switch (code)
-            {
-                case "basic_info":
-                    {
-                        var guid = new PageGuid()
-                        {
-                            Modular = this.PageGuid.Modular,
-                            MoudingType = eMoudingType.Tab,
-                            Function = "basic_info",
-                        };
-                        if (!IsExistPage(guid, true))
-                        {
-                            var page = new XhsSchemeBasicInfoPage();
-                            page.SetBindingData(_project.ID);
-                            page.PageTitle.Caption = e.Element.Text;
-                            page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage;
-                            page.PageTitle.SvgImageSize = svg_image_size;
-                            CreatePage(page, guid);
-                        }
-                    }
-                    break;
-                case "asset_mgr":
-                    {
-                        var guid = new PageGuid()
-                        {
-                            Modular = this.PageGuid.Modular,
-                            MoudingType = eMoudingType.Tab,
-                            Function = "asset_mgr",
-                        };
-                        if (!IsExistPage(guid, true))
-                        {
-                            var page = new XhsSchemeAssetMgrPage();
-                            await page.SetBindingData(_project.ID);
-                            page.PageTitle.Caption = e.Element.Text;
-                            page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage;
-                            page.PageTitle.SvgImageSize = svg_image_size;
-                            CreatePage(page, guid);
-                        }
-                    }
-                    break;
-                case "hydraulic_simulation":
-                    {
-                        var guid = new PageGuid()
-                        {
-                            Modular = this.PageGuid.Modular,
-                            MoudingType = eMoudingType.Tab,
-                            Function = "hydraulic_simulation",
-                        };
-                        if (!IsExistPage(guid, true))
-                        {
-                            var page = new XhsSchemeHydraulicSimulationPage();
-                            await page.SetBindingData(_project.ID);
-                            page.PageTitle.Caption = e.Element.Text;
-                            page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage;
-                            page.PageTitle.SvgImageSize = svg_image_size;
-                            CreatePage(page, guid);
-                        }
-                    }
-                    break;
-                case "create_scheme":
-                    {
-                        var dlg = new CreateSchemeDlg();
-                        dlg.ShowDialog();
-                    }
-                    break;
-                case "scheme_comparison":
-                    {
-                        var guid = new PageGuid()
-                        {
-                            Modular = this.PageGuid.Modular,
-                            MoudingType = eMoudingType.Tab,
-                            Function = "scheme_comparison",
-                        };
-                        if (!IsExistPage(guid, true))
-                        {
-                            var page = new XhsSchemeComparisonPage();
-                            page.PageTitle.Caption = e.Element.Text;
-                            page.PageTitle.HeaderSvgImage = e.Element.ImageOptions.SvgImage;
-                            page.PageTitle.SvgImageSize = svg_image_size;
-                            CreatePage(page, guid);
-                        }
-                    }
-                    break;
-                default:
-                    break;
-            }
         }
 
         #region TabbedView 鐩稿叧浜嬩欢澶勭悊绋嬪簭

--
Gitblit v1.9.3