From 6f8c6a3b2277b92a24319f672811da113861cfc1 Mon Sep 17 00:00:00 2001
From: duheng <2784771470@qq.com>
Date: 星期一, 23 九月 2024 10:42:30 +0800
Subject: [PATCH] 提交缺少修改

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs |   34 +++++++++++++++++++++++++++++++++-
 1 files changed, 33 insertions(+), 1 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs
index 3c7e180..f65d8f1 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/04-simulation/06-simulation/01-AutoMatching/AssetsAutoMatchingMainDlg.cs
@@ -5,15 +5,47 @@
         public AssetsAutoMatchingMainDlg()
         {
             InitializeComponent();
+            this.AssetsMainChoicePage.FormRowClickEvent += AssetsMainChoicePage_FormRowClickEvent;
         }
 
-        public void SetBindingData()
+        private void AssetsMainChoicePage_FormRowClickEvent(string code)
         {
+            AssetsMatchingClickEvent.Invoke(code);
+        }
+
+        public event Func<AssetsAutoMatchingViewModel, bool> RelaodEvent = null;
+
+        public event Action<string> AssetsMatchingClickEvent = null;
+
+        private AssetsAutoMatchingViewModel _assetsAutoMatching = null;
+
+        public void SetBindingData(AssetsAutoMatchingViewModel assetsAutoMatchingInputViewModel)
+        {
+            _assetsAutoMatching = assetsAutoMatchingInputViewModel;
+            this.AssetsMainChoicePage.SetBindingData(_assetsAutoMatching);
         }
 
         //瀹屾垚
         private void btnComplete_Click(object sender, EventArgs e)
         {
+            if (RelaodEvent.Invoke(_assetsAutoMatching))
+            {
+                TipFormHelper.ShowSucceed("淇敼鎴愬姛!");
+            }
+            else
+            {
+                TipFormHelper.ShowError("淇敼澶辫触!");
+            }
+            this.DialogResult = DialogResult.OK;
+            this.Close();
+        }
+
+        //鑷姩鍖归厤
+        private async void BtnAutoMatching_Click(object sender, EventArgs e)
+        {
+            WaitFormHelper.ShowWaitForm(this);
+            _assetsAutoMatching = await this.AssetsMainChoicePage.SetMatching(_assetsAutoMatching);
+            WaitFormHelper.HideWaitForm(this);
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3