Ejemplo n.º 1
0
        public override async void Del()
        {
            try
            {
                if (GridModel == null)
                {
                    return;
                }
                if (await Msg.Question($"确认删除用户:{GridModel.UserName}?"))
                {
                    UpdateLoading(true, "正在删除用户...");
                    var r = await service.DeleteUserAsync(GridModel.Id);

                    if (r.success)
                    {
                        await GetPageData(1);
                    }
                    else
                    {
                        UpdateLoading(false);
                        Msg.Warning(r.message);
                    }
                }
            }
            catch (Exception ex)
            {
                Log.Error(ex.Message);
            }
            finally
            {
                UpdateLoading(false);
            }
        }