duheng
2025-01-13 e7df5d1ece7ecabaa7a3943f24a6621649fdc455
WinFrmUI/HStation.WinFrmUI.Auth.Core/04-role-projcet-menu/RoleProjectMenuPage.cs
@@ -1,15 +1,4 @@
using DevExpress.XtraEditors;
using NetTaste;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Yw;
using Yw;
using Yw.WinFrmUI;
namespace HStation.WinFrmUI
@@ -32,15 +21,14 @@
        private List<RoleProjcetMenuViewModel> _allBindingList;
        private long _roleID;
        private Yw.Vmo.Role _lastRole;
        /// <summary>
        /// 聚焦改变事件
        /// </summary>
        private async void RoleTreeListCtrl1_FocusedChangedEvent(Yw.Vmo.Role obj)
        {
            _roleID = obj.ID;
            _lastRole = obj;
            _allBindingList = new List<RoleProjcetMenuViewModel>();
            var allList = await BLLFactory<Yw.BLL.RoleProjectMenuMapping>.Instance.GetAuthorizeMenuList(GlobalParas._GlobalParas.ProjectID, obj.ID);
            foreach (var item in allList)
@@ -64,7 +52,7 @@
            }
            var vmo = new Yw.Vmo.SetRoleProjectMenu();
            vmo.ProjectID = GlobalParas._GlobalParas.ProjectID;
            vmo.RoleID = _roleID;
            vmo.RoleID = _lastRole.ID;
            vmo.MenuIds = menuList;
            var bol = await BLLFactory<Yw.BLL.RoleProjectMenuMapping>.Instance.Set(vmo);
            if (bol)
@@ -102,5 +90,10 @@
                _isCheck = parentNode.Checked;
            }
        }
        private void barBtnRefresh_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            RoleTreeListCtrl1_FocusedChangedEvent(_lastRole);
        }
    }
}