Exemple #1
0
        private async void Sb_Empower_Click(object sender, EventArgs e)
        {
            _nodes = new List <TreeListNode>();
            RecursiveNode(Tl_Data.Nodes);
            var permissions = _nodes.Aggregate(string.Empty, (current, node) => current + $"{node["AuthorityNum"]},");
            var id          = Guid.Parse(Gv_Admins.GetFocusedRowCellValue("Id").ToString());
            var result      = await _adminApi.UpdateAdminPower(id, permissions);

            if (!result)
            {
                PopupProvider.Warning("赋权失败!");
                return;
            }

            PopupProvider.Success("赋权成功!");
        }