From 9407658b38b9925685e9e47c89491edf2ebdd15b Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期三, 14 八月 2024 10:58:11 +0800
Subject: [PATCH] 界面微调 program 冲突

---
 WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.cs |   28 +++++++++++++++++++++++++---
 1 files changed, 25 insertions(+), 3 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.cs b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.cs
index 5ec6b24..f8125e0 100644
--- a/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/04-dlg/AddProjectDlg.cs
@@ -7,12 +7,12 @@
             InitializeComponent();
         }
 
-        public event Func<Vmo.Xhs.XhsProjectExtensions, bool> ReloadEvent;
+        public event Func<Vmo.Xhs.XhsProjectExtensions, Task<bool>> ReloadDataEvent;
 
         //鏁版嵁楠岃瘉
         private bool Valid()
         {
-            return false;
+            return true;
         }
 
         //纭畾
@@ -20,8 +20,30 @@
         {
             if (!Valid())
                 return;
-            var bll = new BLL.XhsProjectExtensions();
             var model = new Vmo.Xhs.XhsProjectExtensions();
+            model.Address = this.TextAdress.Text.Trim();
+            model.Customer = this.TextCustomerName.Text.Trim();
+            model.Description = this.TextDescription.Text.Trim();
+            model.Name = this.TextProjectName.Text.Trim();
+            model.TagName = this.TextTagName.Text.Trim();
+            model.SiteList = new List<Vmo.Xhs.XhsProjectSite>
+            {
+                new Vmo.Xhs.XhsProjectSite
+                {
+                    Name=this.TextProjectName.Text,
+                    Description=this.TextDescription.Text,
+                }
+            };
+            if (await this.ReloadDataEvent.Invoke(model))
+            {
+                MessageBoxHelper.ShowSuccess("娣诲姞鎴愬姛!");
+            }
+            else
+            {
+                MessageBoxHelper.ShowError("娣诲姞澶辫触!");
+            }
+            this.DialogResult = DialogResult.OK;
+            this.Close();
         }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3