async void OnDelPostAlbum(object sender, Mi e) { var pa = new Postalbum(PostID: _fv.Row.ID, AlbumID: e.Row.ID); if (await AtPublish.Delete(pa)) { LoadAlbum(_fv.Row.ID); } }
async void OnDelPostKeyword(object sender, Mi e) { Postkeyword pk = new Postkeyword(PostID: _fv.Row.ID, Keyword: e.Row.Str(0)); if (await AtPublish.Delete(pk)) { LoadKeyword(_fv.Row.ID); } }
async void OnDelPost(object sender, Mi e) { Post post = (Post)_fv.Data; if (!await Kit.Confirm($"确认要删除[{post.Title}]吗?")) { Kit.Msg("已取消删除!"); return; } if (await AtPublish.Delete(post)) { LoadAll(); _fv.Data = null; _lvKeyword.Data = null; _lvAlbum.Data = null; } }
async void OnDel(object sender, Mi e) { var key = e.Data.To <Keyword>(); if (await IsUsed(key.ID)) { return; } if (!await Kit.Confirm($"确认要删除[{key.ID}]吗?")) { Kit.Msg("已取消删除!"); return; } if (await AtPublish.Delete(key)) { LoadAll(); } }
async void OnDel(object sender, Mi e) { var album = e.Data.To <Album>(); if (await IsUsed(album.ID)) { return; } if (!await Kit.Confirm($"确认要删除[{album.Name}]吗?")) { Kit.Msg("已取消删除!"); return; } if (await AtPublish.Delete(album)) { LoadAll(); } }