Example #1
0
        private async void Delete()
        {
            if (!Global.HasRight("0503"))
            {
                MessageAlert.Alert("权限不足!");
                return;
            }
            if (SelectedRole == null)
            {
                MessageAlert.Alert("请选择要删除的记录!");
                return;
            }
            var confirm = await MessageAlert.Confirm("确定删除此记录?");

            if (!confirm)
            {
                return;
            }
            RoleDao dao = new RoleDao();
            var     rlt = dao.DeleteRole(SelectedRole.Id);

            if (rlt.HasError)
            {
                MessageAlert.Alert(rlt.Msg);
            }
            RefreshList(null);
        }