From 6e1306ab578ed1ad79fc33b0bb7e496b897bf4a4 Mon Sep 17 00:00:00 2001
From: lixiaojun <1287241240@qq.com>
Date: 星期一, 20 一月 2025 10:48:03 +0800
Subject: [PATCH] 冲突处理

---
 WinFrmUI/HStation.WinFrmUI.Auth.Core/06-user-info/UserInfoPage.cs |   49 ++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 44 insertions(+), 5 deletions(-)

diff --git a/WinFrmUI/HStation.WinFrmUI.Auth.Core/06-user-info/UserInfoPage.cs b/WinFrmUI/HStation.WinFrmUI.Auth.Core/06-user-info/UserInfoPage.cs
index 65af4d9..2feaff8 100644
--- a/WinFrmUI/HStation.WinFrmUI.Auth.Core/06-user-info/UserInfoPage.cs
+++ b/WinFrmUI/HStation.WinFrmUI.Auth.Core/06-user-info/UserInfoPage.cs
@@ -25,19 +25,32 @@
             InitializeComponent();
             this.PageTitle.Caption = "涓汉涓績";
             this.PageTitle.SvgImageSize = new Size(24, 24);
+            this.Load += UserInfoPage_Load;
         }
 
         private const string _smsTemplate = "hzkw_sms_template";//鎵嬫満鍙风櫥褰曟ā鏉�
-        private const string _vxTemplate = "hzkw_vx_template";//寰俊鐧诲綍妯℃澘
+        private const string _vxTemplate = "hzkw_wx_template";//寰俊鐧诲綍妯℃澘
         private const string _software = "HStation_XHS_DESKTOP";//杞欢缂栫爜
 
         //淇敼瀵嗙爜
         private void BtnEditPwd_Click(object sender, EventArgs e)
         {
+            var dlg = new UpdatePwdDlg();
+            dlg.SetBindingData(GlobalParas._GlobalParas.LoginID);
+            dlg.ShowDialog();
+        }
+
+        //鍒濆鍖�
+        private void UserInfoPage_Load(object? sender, EventArgs e)
+        {
+            this.txtEditUserName.Text = GlobalParas._GlobalParas.LoginName;
+            this.txtEditAdminType.Text = GlobalParas._GlobalParas.AdminType;
+            this.txtAccountName.Text = GlobalParas._GlobalParas.AccountName;
+            this.textAccountType.Text = GlobalParas._GlobalParas.LoginType;
         }
 
         //鎵嬫満缁戝畾
-        private async void BtnPhoneBinding_Click(object sender, EventArgs e)
+        private async void PhoneBinding()
         {
             if (!IsValidMobileNumber(this.txtMobileNumber.Text.Trim()))
             {
@@ -86,14 +99,12 @@
         }
 
         //寰俊缁戝畾
-        private void btnWechatBinding_Click(object sender, EventArgs e)
+        private void WechatBinding()
         {
             var dlg = new WechatBindingDlg();
             dlg.SetBindingData();
             dlg.CodeReloadData += async (code) =>
             {
-                // Yw.Dto.InternalException 鎶ラ敊绫�
-
                 var loginType = await BLLFactory<Yw.BLL.UserLoginType>.Instance.GetByIdentifier(LoginType.Wechat);
                 if (loginType != null)
                 {
@@ -132,5 +143,33 @@
             };
             dlg.ShowDialog();
         }
+
+        //閲嶇疆瀵嗙爜
+        private async void BtnResetPwd_Click(object sender, EventArgs e)
+        {
+            if (XtraMessageBox.Show($"纭閲嶇疆瀵嗙爜鍚�?", "鎻愮ず", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) != DialogResult.OK)
+                return;
+            if (!await BLLFactory<Yw.BLL.UserLoginAccount>.Instance.ResetSystemLoginPwd(GlobalParas._GlobalParas.LoginID))
+            {
+                MessageBoxHelper.ShowError("閲嶇疆澶辫触锛�");
+                return;
+            }
+            MessageBoxHelper.ShowSuccess("閲嶇疆鎴愬姛锛�");
+        }
+
+        private void buttonEditBinding_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
+        {
+            var tag_obj = e.Button.Tag;
+            switch (tag_obj)
+            {
+                case "Phone":
+                    PhoneBinding();
+                    break;
+
+                case "Wechat":
+                    WechatBinding();
+                    break;
+            }
+        }
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3