ningshuxia
2025-03-28 ba369f7a7b260c356b1b63fdbe603f44b15cfec5
Desktop/PBS.Desktop/Login/LoginFrm.cs
@@ -1,5 +1,4 @@
using DevExpress.DataProcessing;
using DevExpress.XtraBars.Navigation;
using DevExpress.XtraBars.Navigation;
using DevExpress.XtraEditors;
using HStation.WinFrmUI;
using Yw;
@@ -71,7 +70,11 @@
                return;
            }
            this.Invoke(() =>
            //while (!this.IsHandleCreated)
            //    await Task.Delay(100); // 异步等待
            this.Invoke(new Action(() =>
            {
                var threadId = Thread.CurrentThread.ManagedThreadId;
                Yw.Untity.UserRegister.Regist
@@ -86,11 +89,20 @@
                       result.Software.Project.ID,
                       result.Software.ID
                   );
            });
            }));
            Yw.WinFrmUI.LoginUserInfo.CorpID = result.User.Corpration.ID;
            Yw.WinFrmUI.LoginUserInfo.UserID = result.User.ID;
            Yw.WinFrmUI.LoginUserInfo.AdminType = result.User.AdminType;
            Yw.WinFrmUI.LoginUserInfo.UserName = result.User.Name;
            Yw.WinFrmUI.LoginUserInfo.UserTag = result.User.Tag;
            Yw.WinFrmUI.LoginUserInfo.LoginAccountID = result.User.LoginAccount.ID;
            Yw.WinFrmUI.LoginUserInfo.LoginTypeID = result.User.LoginAccount.LoginType.ID;
            Yw.WinFrmUI.LoginUserInfo.ProjectID = result.Software.Project.ID;
            Yw.WinFrmUI.LoginUserInfo.SoftwareID = result.Software.ID;
            Yw.JwtToken2Helper.Set(result.AccessToken, result.RefreshToken);
            var login = new HStation.GlobalParas(result);
            var authTreelist = await BLLFactory<Yw.BLL.MenuAuthority>.Instance.GetHaveMenuTreeList(HStation.GlobalParas._GlobalParas.SoftwareID, HStation.GlobalParas._GlobalParas.UserID);
            var authTreelist = await BLLFactory<Yw.BLL.MenuAuthority>.Instance.GetHaveMenuTreeList(LoginUserInfo.SoftwareID, LoginUserInfo.UserID);
            AuthHelper.PageAuthHaveTreeList = authTreelist;
            this.DialogResult = DialogResult.OK;
            this.Close();