From 502ed6f01f605098d46a1fe9f55f416d5c5c3e13 Mon Sep 17 00:00:00 2001
From: Shuxia Ning <NingShuxia0927@outlook.com>
Date: 星期四, 26 九月 2024 17:33:12 +0800
Subject: [PATCH] Merge branch 'master' of http://47.103.154.90:83/r/HStation/XHS.V1.0

---
 Desktop/HStation.DeskTop.Xhs.Main/Login/LoginFrm.cs |   40 ++++++++++++++++++++++++++++++++--------
 1 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/Desktop/HStation.DeskTop.Xhs.Main/Login/LoginFrm.cs b/Desktop/HStation.DeskTop.Xhs.Main/Login/LoginFrm.cs
index c5d6eb7..7ae57a1 100644
--- a/Desktop/HStation.DeskTop.Xhs.Main/Login/LoginFrm.cs
+++ b/Desktop/HStation.DeskTop.Xhs.Main/Login/LoginFrm.cs
@@ -1,14 +1,12 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
+锘縰sing DevExpress.XtraEditors;
+using System;
 using System.Drawing;
-using System.Text;
-using System.Linq;
-using System.Threading.Tasks;
 using System.Windows.Forms;
 using System.Configuration;
+
 using DevExpress.XtraEditors;
+
+using HStation.WinFrmUI;
 
 namespace HStation.Desktop
 {
@@ -106,7 +104,7 @@
             }
         }
 
-        //鐧诲綍
+        //鐧诲綍  (杩滅▼鐧诲綍)
         private async void Login()
         {
             if (!Valid())
@@ -138,8 +136,34 @@
             }
             settings.Save();
 
+            var login = new GlobalParas(result);
             this.DialogResult = DialogResult.OK;
             this.Close();
         }
+
+        //鏈湴鐧诲綍
+        private async void LocalLogin()
+        {
+            if (!Valid())
+                return;
+            var bll = new BLL.UserLoginAccount();
+            var alluser = await bll.GetAll();
+            bool found = false;
+            foreach (var item in alluser)
+            {
+                if (item.LoginName == this.txtLoginName.Text.Trim() && item.PassWord == this.txtPwd.Text.Trim())
+                {
+                    this.DialogResult = DialogResult.OK;
+                    this.Close();
+                    found = true;
+                    break;
+                }
+            }
+            if (!found)
+            {
+                WinFrmUI.MessageBoxHelper.ShowError("鐧诲綍澶辫触");
+                this.itemForProgress.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never;
+            }
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3